oplog

package
v0.0.0-...-86c6960 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Applier

type Applier interface {
	Apply(ctx context.Context, opr models.Oplog) error
	Close(ctx context.Context) error
}

Applier defines interface to apply given oplog records.

func NewWriteApplier

func NewWriteApplier(format string, wc io.WriteCloser) (Applier, error)

NewWriteApplier builds one of write appliers

type BSONApplier

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

BSONApplier implements Applier interface for debugging.

func NewBSONApplier

func NewBSONApplier(w io.WriteCloser) *BSONApplier

NewBSONApplier builds BSONApplier with given args.

func (*BSONApplier) Apply

func (ap *BSONApplier) Apply(ctx context.Context, opr models.Oplog) error

func (*BSONApplier) Close

func (ap *BSONApplier) Close(ctx context.Context) error

type BSONRawApplier

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

BSONRawApplier implements Applier interface for debugging.

func NewBSONRawApplier

func NewBSONRawApplier(w io.WriteCloser) *BSONRawApplier

NewBSONRawApplier builds BSONRawApplier with given args.

func (*BSONRawApplier) Apply

func (ap *BSONRawApplier) Apply(ctx context.Context, opr models.Oplog) error

func (*BSONRawApplier) Close

func (ap *BSONRawApplier) Close(ctx context.Context) error

type DBApplier

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

DBApplier implements Applier interface for mongodb.

func NewDBApplier

func NewDBApplier(m client.MongoDriver, preserveUUID bool, ignoreErrCodes map[string][]int32) *DBApplier

NewDBApplier builds DBApplier with given args.

func (*DBApplier) Apply

func (ap *DBApplier) Apply(ctx context.Context, opr models.Oplog) error

func (*DBApplier) Close

func (ap *DBApplier) Close(ctx context.Context) error

type JSONApplier

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

JSONApplier implements Applier interface for debugging.

func NewJSONApplier

func NewJSONApplier(w io.WriteCloser) *JSONApplier

NewJSONApplier builds JSONApplier with given args.

func (*JSONApplier) Apply

func (ap *JSONApplier) Apply(ctx context.Context, opr models.Oplog) error

func (*JSONApplier) Close

func (ap *JSONApplier) Close(ctx context.Context) error

type OpHandleError

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

func NewOpHandleError

func NewOpHandleError(op interface{}, err error) *OpHandleError

func (*OpHandleError) Error

func (e *OpHandleError) Error() string

type TypeAssertionError

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

func NewTypeAssertionError

func NewTypeAssertionError(etype, key string, value interface{}) *TypeAssertionError

func (*TypeAssertionError) Error

func (e *TypeAssertionError) Error() string

Jump to

Keyboard shortcuts

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