source

package
v0.0.0-...-5fa7609 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2021 License: Apache-2.0 Imports: 10 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            token.Data             `bson:"_id" json:"_id"`
	FullDocument  map[string]interface{} `bson:"fullDocument" json:"fullDocument"`
	OperationType string                 `bson:"operationType" json:"operationType"`
	DocumentKey   struct {
		Id primitive.ObjectID `bson:"_id" json:"_id"`
	} `bson:"documentKey" json:"documentKey"`
	Ns struct {
		Coll string `bson:"coll" json:"coll"`
		Db   string `bson:"db" json:"db"`
	} `bson:"ns" json:"ns"`
}

type Params

type Params struct {
	DbName  string
	ColName string
	Time    string
	Token   token.Data
}

type Source

type Source struct {
	// contains filtered or unexported fields
}

func NewSource

func NewSource(ctx context.Context) *Source

func (*Source) Connect

func (o *Source) Connect(config settings.MongoSource) error

func (*Source) GetClone

func (o *Source) GetClone(param *Params) (*mongo.Cursor, error)

func (*Source) GetCount

func (o *Source) GetCount(param *Params) (int64, error)

func (*Source) GetStream

func (o *Source) GetStream(param *Params) (*mongo.ChangeStream, error)

Jump to

Keyboard shortcuts

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