Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Watcher ¶
type Watcher struct {
// contains filtered or unexported fields
}
Watcher represents a listener of database changes.
func NewWatcher ¶
func NewWatcher(db *mongo.Database, dbName string, handler WatcherFunc, logger *zap.Logger) *Watcher
NewWatcher creates a new database event watcher.
type WatcherFunc ¶
type WatcherFunc func(*Event)
WatcherFunc is a function to send database changes.
Click to show internal directories.
Click to hide internal directories.