cdcmongo

package
v1.16.0 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2023 License: MIT Imports: 17 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
)
View Source
const BackendName = "cdc-mongo"

Variables

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

Functions

This section is empty.

Types

type Mongo

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

func New

func New(connOpts *opts.ConnectionOptions) (*Mongo, error)

func (*Mongo) Close

func (m *Mongo) Close(ctx context.Context) error

func (*Mongo) DisplayError

func (m *Mongo) DisplayError(msg *records.ErrorRecord) error

DisplayError will parse an Error record and print (pretty) output to STDOUT

func (*Mongo) DisplayMessage

func (m *Mongo) DisplayMessage(cliOpts *opts.CLIOptions, msg *records.ReadRecord) error

func (*Mongo) Name

func (m *Mongo) Name() string

func (*Mongo) Read

func (m *Mongo) Read(ctx context.Context, readOpts *opts.ReadOptions, resultsChan chan *records.ReadRecord, errorChan chan *records.ErrorRecord) error

func (*Mongo) Relay

func (m *Mongo) Relay(ctx context.Context, relayOpts *opts.RelayOptions, relayCh chan interface{}, errorCh chan<- *records.ErrorRecord) error

func (*Mongo) Test

func (m *Mongo) Test(_ context.Context) error

func (*Mongo) Tunnel added in v1.4.0

func (m *Mongo) Tunnel(ctx context.Context, opts *opts.TunnelOptions, tunnelSvc tunnel.ITunnel, errorCh chan<- *records.ErrorRecord) error

func (*Mongo) Write

func (m *Mongo) Write(ctx context.Context, writeOpts *opts.WriteOptions, errorCh chan<- *records.ErrorRecord, messages ...*records.WriteRecord) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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