cdc_mongo

package
v0.35.0 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2021 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ConnectionTimeout determines how long before a connection attempt to mongo is timed out
	ConnectionTimeout = time.Second * 10

	// ReadRetryInterval is how long to wait between read errors before plumber tries reading again
	ReadRetryInterval = time.Second * 5
)

Variables

View Source
var (
	ErrMissingDatabase  = errors.New("you must specify the --database flag")
	ErrConnectionFailed = errors.New("could not open mongo connection")
)

Functions

func NewService

func NewService(opts *cli.Options) (*mongo.Client, error)

func Read

func Read(opts *cli.Options, _ *desc.MessageDescriptor) error

func Relay

func Relay(opts *cli.Options, relayCh chan interface{}, shutdownCtx context.Context) (relay.IRelayBackend, error)

Types

type CDCMongo

type CDCMongo struct {
	Id      string
	Service *mongo.Client
	Context context.Context
	Options *cli.Options
	// contains filtered or unexported fields
}

func (*CDCMongo) Read

func (m *CDCMongo) Read() error

Read attempts to read a change stream from mongo

type Relayer

type Relayer struct {
	Options *cli.Options
	RelayCh chan interface{}

	Service     *mongo.Client
	ShutdownCtx context.Context
	// contains filtered or unexported fields
}

func (*Relayer) Relay

func (r *Relayer) Relay() error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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