mongodb

package
v0.0.0-...-6f7b503 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 31, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChangeEvent

type ChangeEvent struct {
	ID            changeID            `bson:"_id"`
	OperationType string              `bson:"operationType"`
	ClusterTime   primitive.Timestamp `bson:"clusterTime"`
	FullDocument  bson.D              `bson:"fullDocument"`
	DocumentKey   documentKey         `bson:"documentKey"`
	Ns            namespace           `bson:"ns"`
}

type ErrorEvent

type ErrorEvent struct {
	Event ChangeEvent
	Err   error
}

type MongoDriver

type MongoDriver struct {
	Config *MongoOptions
	Driver *mongo.Client
}

func (*MongoDriver) Init

func (d *MongoDriver) Init(config []byte)

func (*MongoDriver) Read

func (d *MongoDriver) Read(ctx context.Context, eventCh chan ChangeEvent) error

type MongoOptions

type MongoOptions struct {
	MongoURI string `yaml:"URI"`
	Database string `yaml:"database"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL