oplog

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2019 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Apply added in v0.5.0

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

func NewOplogApply

func NewOplogApply(session *mgo.Session, r bsonfile.BSONReader) (*Apply, error)

func NewOplogApplyUntil

func NewOplogApplyUntil(session *mgo.Session, r bsonfile.BSONReader, stopAtTs bson.MongoTimestamp,
) (*Apply, error)

func (*Apply) Count added in v0.5.0

func (oa *Apply) Count() int64

func (*Apply) Run added in v0.5.0

func (oa *Apply) Run() error

type Collation added in v0.5.0

type Collation struct {
	Locale          string `bson:"locale"`
	Alternate       string `bson:"alternate"`
	CaseFirst       string `bson:"caseFirst"`
	MaxVariable     string `bson:"maxVariable"`
	Version         string `bson:"version"`
	Strength        int    `bson:"strength"`
	CaseLevel       bool   `bson:"caseLevel"`
	NumericOrdering bool   `bson:"numericOrdering"`
	Normalization   bool   `bson:"normalization"`
	Backwards       bool   `bson:"backwards"`
}

type Common added in v0.5.0

type Common struct {
	H    int64               `bson:"h"`
	NS   string              `bson:"ns"`
	Op   string              `bson:"op"`
	T    int                 `bson:"t"`
	TS   bson.MongoTimestamp `bson:"ts"`
	UI   bson.Binary         `bson:"ui"`
	V    int                 `bson:"v"`
	Wall time.Time           `bson:"wall"`
}

type OplogTail

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

func Open

func Open(session *mgo.Session) (*OplogTail, error)

func OpenAt

func OpenAt(session *mgo.Session, t time.Time, c uint32) (*OplogTail, error)

func (*OplogTail) Cancel

func (ot *OplogTail) Cancel()

Cancel stopts the tailer immediately without waiting the tailer to reach the document having timestamp = IsMasterDoc().LastWrite.OpTime.Ts

func (*OplogTail) Close

func (ot *OplogTail) Close() error

func (*OplogTail) CloseAt

func (ot *OplogTail) CloseAt(ts bson.MongoTimestamp) error

func (*OplogTail) Count

func (ot *OplogTail) Count() uint64

func (*OplogTail) LastOplogTimestamp

func (ot *OplogTail) LastOplogTimestamp() bson.MongoTimestamp

func (*OplogTail) Read

func (ot *OplogTail) Read(buf []byte) (int, error)

Implement the Reader interface to be able to pipe it into an S3 stream or through an encrypter

func (*OplogTail) Size

func (ot *OplogTail) Size() uint64

func (*OplogTail) WaitUntilFirstDoc

func (ot *OplogTail) WaitUntilFirstDoc() error

func (*OplogTail) WaitUntilFirstDocWithTimeout

func (ot *OplogTail) WaitUntilFirstDocWithTimeout(timeout time.Duration) (bool, error)

Jump to

Keyboard shortcuts

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