Versions in this module Expand all Collapse all v1 v1.0.0 Jul 9, 2019 Changes in this version + 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 FirstOpTimestamp(session *mgo.Session, options *Options) bson.MongoTimestamp + 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 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 struct + func VersionInfo(session *mgo.Session) (buildInfo *BuildInfo, err error) + type ChangeDoc struct + DocKey map[string]interface{} + FullDoc *bson.Raw + Id interface{} + Namespace map[string]string + Operation string + Timestamp bson.MongoTimestamp + UpdateDescription *bson.Raw + type CollectionSegment struct + type CollectionStats struct + AvgObjectSize int64 + Count int64 + func GetCollectionStats(ctx *OpCtx, session *mgo.Session, ns string) (stats *CollectionStats, err error) + type DataUnmarshaller func(namespace string, raw *bson.Raw) (interface{}, error) + type Doc struct + Id interface{} + type N struct + type Op struct + Data map[string]interface{} + Doc interface{} + Id interface{} + Namespace string + Operation string + Source QuerySource + Timestamp bson.MongoTimestamp + UpdateDescription map[string]interface{} + 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 struct + BufferDuration time.Duration + BufferSize int + Entries []*Op + func (this *OpBuf) Append(op *Op) + func (this *OpBuf) Flush(s *mgo.Session, ctx *OpCtx, options *Options) + func (this *OpBuf) HasOne() bool + func (this *OpBuf) IsFull() bool + type OpChan chan *Op + func Tail(session *mgo.Session, options *Options) (OpChan, chan error) + type OpCtx struct + DirectReadWg *sync.WaitGroup + ErrC chan error + OpC OpChan + func Start(session *mgo.Session, options *Options) *OpCtx + func (ctx *OpCtx) Pause() + func (ctx *OpCtx) Resume() + func (ctx *OpCtx) Since(ts bson.MongoTimestamp) + func (ctx *OpCtx) Stop() + type OpCtxMulti struct + DirectReadWg *sync.WaitGroup + ErrC chan error + OpC OpChan + func StartMulti(sessions []*mgo.Session, options *Options) *OpCtxMulti + func (ctx *OpCtxMulti) AddShardListener(configSession *mgo.Session, shardOptions *Options, handler ShardInsertHandler) + func (ctx *OpCtxMulti) Pause() + func (ctx *OpCtxMulti) Resume() + func (ctx *OpCtxMulti) Since(ts bson.MongoTimestamp) + func (ctx *OpCtxMulti) Stop() + type OpFilter func(*Op) bool + func ChainOpFilters(filters ...OpFilter) OpFilter + func OpFilterForOrdering(ordering OrderingGuarantee, workers []string, worker string) OpFilter + type OpLog struct + Doc *bson.Raw + HistoryID int64 + MongoVersion int + Namespace string + Operation string + Timestamp bson.MongoTimestamp + Update *bson.Raw + type OpLogEntry map[string]interface + type Options struct + After TimestampGenerator + BufferDuration time.Duration + BufferSize int + ChangeStreamNs []string + ChannelSize int + CursorTimeout *string + DirectReadFilter OpFilter + DirectReadNs []string + DirectReadSplitMax int + Filter OpFilter + Log *log.Logger + MaxWaitSecs int + NamespaceFilter OpFilter + OpLogCollectionName *string + OpLogDatabaseName *string + OpLogDisabled bool + Ordering OrderingGuarantee + Pipe PipelineBuilder + PipeAllowDisk bool + SplitVector bool + Unmarshal DataUnmarshaller + UpdateDataAsDelta bool + WorkerCount int + func DefaultOptions() *Options + func (this *Options) SetDefaults() + type OrderingGuarantee int + const AnyOrder + const Document + const Namespace + const Oplog + type PipelineBuilder func(namespace string, changeStream bool) ([]interface{}, error) + type QuerySource int + const DirectQuerySource + const OplogQuerySource + type ShardInfo struct + func GetShards(session *mgo.Session) (shardInfos []*ShardInfo) + func (shard *ShardInfo) GetURL() string + type ShardInsertHandler func(*ShardInfo) (*mgo.Session, error) + type SplitVectorRequest struct + Force bool + KeyPattern bson.M + Max interface{} + MaxChunkSize int + MaxSplitPoints int + Min interface{} + SplitVector string + type SplitVectorResult struct + Ok int + SplitKeys []bson.M + type TimestampGenerator func(*mgo.Session, *Options) bson.MongoTimestamp Other modules containing this package github.com/rwynn/gtm/v2