Versions in this module Expand all Collapse all v1 v1.0.4 Apr 9, 2024 v1.0.3 Mar 22, 2024 v1.0.2 Mar 21, 2024 v1.0.1 Mar 21, 2024 v1.0.0 Oct 24, 2023 Changes in this version + func GetClient() *mongo.Client + func GetTimeoutLimit() time.Duration + func InitClient(opt *Options) error + func SetClient(cli *mongo.Client) + type CollectionInfo struct + Actions []string + Name string + type Database struct + Collections []*CollectionInfo + Name string + type DummyStreamHandler struct + CollName string + DbName string + OpTypes []string + func (h *DummyStreamHandler) GetCollName() string + func (h *DummyStreamHandler) GetDbName() string + func (h *DummyStreamHandler) GetOpTypes() []string + func (h *DummyStreamHandler) OnChange(*StreamObject) error + type NS struct + Collection string + Database string + type Options struct + Addr string + Auth bool + Databases []*Database + Direct bool + PoolSize uint64 + Pwd string + Timeout uint64 + User string + func NewDefaultOpt() *Options + type StreamHandler interface + GetCollName func() string + GetDbName func() string + GetOpTypes func() []string + OnChange func(*StreamObject) error + type StreamMonitor struct + func NewDefaultMonitor(opt *Options) (*StreamMonitor, error) + func (m *StreamMonitor) AddHandler(handlers ...StreamHandler) error + func (m *StreamMonitor) GetHandler(stream *StreamObject) (StreamHandler, bool) + func (m *StreamMonitor) SetStore(store cdcstore.MongoPosInterface) + func (m *StreamMonitor) SetWatcher() error + func (m *StreamMonitor) StartMonitor() error + type StreamObject struct + DocumentKey map[string]interface{} + FullDocument bson.Raw + Id *WatchId + Ns NS + OperationType string + UpdateDescription *UpdateDescription + type UpdateDescription struct + RemoveFields []string + UpdateFields map[string]interface{} + type WatchId struct + Data string