Documentation ¶
Index ¶
- func ConsumeChangeStream(ctx *OpCtx, session *mgo.Session, ns string, options *Options) (err error)
- func DirectReadPaged(ctx *OpCtx, session *mgo.Session, ns string, options *Options) (err error)
- func DirectReadSegment(ctx *OpCtx, session *mgo.Session, ns string, options *Options, ...) (err error)
- func DirectReadSplitVector(ctx *OpCtx, session *mgo.Session, ns string, options *Options) (err error)
- func FetchDocuments(ctx *OpCtx, session *mgo.Session, filter OpFilter, buf *OpBuf, inOp OpChan, ...) error
- func GetOpLogQuery(session *mgo.Session, after bson.MongoTimestamp, options *Options) *mgo.Query
- func LastOpTimestamp(session *mgo.Session, options *Options) bson.MongoTimestamp
- func OpLogCollection(session *mgo.Session, options *Options) *mgo.Collection
- func OpLogCollectionName(session *mgo.Session, options *Options) string
- func ParseTimestamp(timestamp bson.MongoTimestamp) (int32, int32)
- func TailOps(ctx *OpCtx, session *mgo.Session, channels []OpChan, options *Options) error
- func UpdateIsReplace(entry map[string]interface{}) bool
- type BuildInfo
- type ChangeDoc
- type CollectionSegment
- type CollectionStats
- type DataUnmarshaller
- type Doc
- type N
- type Op
- func (this *Op) GetCollection() string
- func (this *Op) GetDatabase() string
- func (this *Op) IsCommand() bool
- func (this *Op) IsDelete() bool
- func (this *Op) IsDrop() bool
- func (this *Op) IsDropCollection() (string, bool)
- func (this *Op) IsDropDatabase() (string, bool)
- func (this *Op) IsInsert() bool
- func (this *Op) IsSourceDirect() bool
- func (this *Op) IsSourceOplog() bool
- func (this *Op) IsUpdate() bool
- func (this *Op) ParseLogEntry(entry *OpLog, options *Options) (include bool, err error)
- func (this *Op) ParseNamespace() []string
- type OpBuf
- type OpChan
- type OpCtx
- type OpCtxMulti
- type OpFilter
- type OpLog
- type OpLogEntry
- type Options
- type OrderingGuarantee
- type PipelineBuilder
- type QuerySource
- type ShardInfo
- type ShardInsertHandler
- type SplitVectorRequest
- type SplitVectorResult
- type TimestampGenerator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConsumeChangeStream ¶
func DirectReadPaged ¶
func DirectReadSegment ¶
func DirectReadSegment(ctx *OpCtx, session *mgo.Session, ns string, options *Options, seg *CollectionSegment, stats *CollectionStats) (err error)
func DirectReadSplitVector ¶
func FetchDocuments ¶
func GetOpLogQuery ¶
func LastOpTimestamp ¶
func LastOpTimestamp(session *mgo.Session, options *Options) bson.MongoTimestamp
func OpLogCollection ¶
func OpLogCollection(session *mgo.Session, options *Options) *mgo.Collection
func ParseTimestamp ¶
func ParseTimestamp(timestamp bson.MongoTimestamp) (int32, int32)
func UpdateIsReplace ¶
Types ¶
type CollectionSegment ¶
type CollectionSegment struct {
// contains filtered or unexported fields
}
type CollectionStats ¶
func GetCollectionStats ¶
type DataUnmarshaller ¶
type Op ¶
type Op struct { Id interface{} `json:"_id"` Operation string `json:"operation"` Namespace string `json:"namespace"` Data map[string]interface{} `json:"data,omitempty"` Timestamp bson.MongoTimestamp `json:"timestamp"` Source QuerySource `json:"source"` Doc interface{} `json:"doc,omitempty"` }
func (*Op) GetCollection ¶
func (*Op) GetDatabase ¶
func (*Op) IsDropCollection ¶
func (*Op) IsDropDatabase ¶
func (*Op) IsSourceDirect ¶
func (*Op) IsSourceOplog ¶
func (*Op) ParseLogEntry ¶
func (*Op) ParseNamespace ¶
type OpCtx ¶
type OpCtx struct { OpC OpChan ErrC chan error DirectReadWg *sync.WaitGroup // contains filtered or unexported fields }
func (*OpCtx) Since ¶
func (ctx *OpCtx) Since(ts bson.MongoTimestamp)
type OpCtxMulti ¶
type OpCtxMulti struct { OpC OpChan ErrC chan error DirectReadWg *sync.WaitGroup // contains filtered or unexported fields }
func StartMulti ¶
func StartMulti(sessions []*mgo.Session, options *Options) *OpCtxMulti
func (*OpCtxMulti) AddShardListener ¶
func (ctx *OpCtxMulti) AddShardListener( configSession *mgo.Session, shardOptions *Options, handler ShardInsertHandler)
func (*OpCtxMulti) Pause ¶
func (ctx *OpCtxMulti) Pause()
func (*OpCtxMulti) Resume ¶
func (ctx *OpCtxMulti) Resume()
func (*OpCtxMulti) Since ¶
func (ctx *OpCtxMulti) Since(ts bson.MongoTimestamp)
func (*OpCtxMulti) Stop ¶
func (ctx *OpCtxMulti) Stop()
type OpFilter ¶
func ChainOpFilters ¶
func OpFilterForOrdering ¶
func OpFilterForOrdering(ordering OrderingGuarantee, workers []string, worker string) OpFilter
type OpLogEntry ¶
type OpLogEntry map[string]interface{}
type Options ¶
type Options struct { After TimestampGenerator Filter OpFilter NamespaceFilter OpFilter OpLogDisabled bool OpLogDatabaseName *string OpLogCollectionName *string CursorTimeout *string // deprecated ChannelSize int BufferSize int BufferDuration time.Duration Ordering OrderingGuarantee WorkerCount int UpdateDataAsDelta bool ChangeStreamNs []string DirectReadNs []string DirectReadFilter OpFilter DirectReadSplitMax int Unmarshal DataUnmarshaller Pipe PipelineBuilder PipeAllowDisk bool SplitVector bool Log *log.Logger NS []string OPs []string }
func DefaultOptions ¶
func DefaultOptions() *Options
func (*Options) SetDefaults ¶
func (this *Options) SetDefaults()
type OrderingGuarantee ¶
type OrderingGuarantee int
const ( Oplog OrderingGuarantee = iota // ops sent in oplog order (strong ordering) Namespace // ops sent in oplog order within a namespace Document // ops sent in oplog order for a single document AnyOrder // ops sent as they become available )
type PipelineBuilder ¶
type QuerySource ¶
type QuerySource int
const ( OplogQuerySource QuerySource = iota DirectQuerySource )
type SplitVectorRequest ¶
type SplitVectorResult ¶
type TimestampGenerator ¶
type TimestampGenerator func(*mgo.Session, *Options) bson.MongoTimestamp
Click to show internal directories.
Click to hide internal directories.