本文整理汇总了Golang中github.com/couchbase/indexing/secondary/protobuf/projector.TsVbuuid.GetSeqnos方法的典型用法代码示例。如果您正苦于以下问题:Golang TsVbuuid.GetSeqnos方法的具体用法?Golang TsVbuuid.GetSeqnos怎么用?Golang TsVbuuid.GetSeqnos使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类github.com/couchbase/indexing/secondary/protobuf/projector.TsVbuuid
的用法示例。
在下文中一共展示了TsVbuuid.GetSeqnos方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。
示例1: StartVbStreams
// StartVbStreams implements Feeder{} interface.
func (bdcp *bucketDcp) StartVbStreams(
opaque uint16, reqTs *protobuf.TsVbuuid) error {
var err error
if bdcp.bucket != nil {
bdcp.bucket.Refresh()
}
vbnos := c.Vbno32to16(reqTs.GetVbnos())
vbuuids, seqnos := reqTs.GetVbuuids(), reqTs.GetSeqnos()
for i, vbno := range vbnos {
snapshots := reqTs.GetSnapshots()
flags, vbuuid := uint32(0), vbuuids[i]
start, end := seqnos[i], uint64(0xFFFFFFFFFFFFFFFF)
snapStart, snapEnd := snapshots[i].GetStart(), snapshots[i].GetEnd()
e := bdcp.dcpFeed.DcpRequestStream(
vbno, opaque, flags, vbuuid, start, end, snapStart, snapEnd)
if e != nil {
err = e
}
// FIXME/TODO: the below sleep avoid back-to-back dispatch of
// StreamRequest to DCP, which seem to cause some problems.
time.Sleep(time.Millisecond)
}
return err
}