Documentation
¶
Index ¶
Constants ¶
View Source
const TS_SOURCE_MONSTACHE = "monstache"
An oplog resume timestamp saved by a monstache instance
View Source
const TS_SOURCE_OPLOG = "oplog"
An oplog resume timestamp taken from the last mongodb operation
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TimestampResolver ¶
type TimestampResolver interface {
GetResumeTimestamp(candidateTs primitive.Timestamp, source string) chan primitive.Timestamp
}
A TimestampResolver decides on a timestamp from which to start reading an oplog from. A result may not be immediately available (see TimestampResolverEarliest), so it is returned in a channel.
type TimestampResolverEarliest ¶
type TimestampResolverEarliest struct {
// contains filtered or unexported fields
}
TimestampResolverEarliest waits until oplog resume timestamps have been queried from all the available mongodb shards, and returns an earliest one.
func NewTimestampResolverEarliest ¶
func NewTimestampResolverEarliest(connectionsTotal int, logger *log.Logger) *TimestampResolverEarliest
func (*TimestampResolverEarliest) GetResumeTimestamp ¶
func (resolver *TimestampResolverEarliest) GetResumeTimestamp(candidateTs primitive.Timestamp, source string) chan primitive.Timestamp
Returns a channel from which an earliest resume timestamp can be received
type TimestampResolverSimple ¶
type TimestampResolverSimple struct{}
A simple resolver immediately returns a timestamp it's been given.
func (TimestampResolverSimple) GetResumeTimestamp ¶
Click to show internal directories.
Click to hide internal directories.