slicer

package
v1.8.1-0...-0157f87 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2024 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const LogStartMsg = "start_ok"

LogStartMsg message to log on successful streaming start

Variables

This section is empty.

Functions

This section is empty.

Types

type OpMovedError

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

OpMovedError is the error signaling that slicing op now being run by the other node

func (OpMovedError) Error

func (e OpMovedError) Error() string

func (OpMovedError) Is

func (e OpMovedError) Is(err error) bool

type Slicer

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

Slicer is an incremental backup object

func NewSlicer

func NewSlicer(
	rs string,
	cn connect.Client,
	node *mongo.Client,
	to storage.Storage,
	cfg *config.Config,
	logger log.Logger,
) *Slicer

NewSlicer creates an incremental backup object

func (*Slicer) Catchup

func (s *Slicer) Catchup(ctx context.Context) error

func (*Slicer) GetSpan

func (s *Slicer) GetSpan() time.Duration

func (*Slicer) OplogOnlyCatchup

func (s *Slicer) OplogOnlyCatchup(ctx context.Context) error

func (*Slicer) SetSpan

func (s *Slicer) SetSpan(d time.Duration)

SetSpan sets span duration. Streaming will recognize the change and adjust on the next iteration.

func (*Slicer) Stream

func (s *Slicer) Stream(
	ctx context.Context,
	startingNode *topo.NodeInfo,
	stopC <-chan struct{},
	backupSig <-chan ctrl.OPID,
	compression compress.CompressionType,
	level *int,
	timeouts *config.BackupTimeouts,
	monitorPrio bool,
) error

Stream streaming (saving) chunks of the oplog to the given storage

Jump to

Keyboard shortcuts

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