replication

package
v0.0.0-...-61eb987 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrConnTimeout = errors.New("connection timeout")

Functions

This section is empty.

Types

type Handler

type Handler interface {
	StartReplication(ctx context.Context) error
	ReceiveMessage(ctx context.Context) (*Message, error)
	SyncLSN(ctx context.Context, lsn LSN) error
	GetReplicationLag(ctx context.Context) (int64, error)
	GetLSNParser() LSNParser
	Close() error
}

Handler manages the replication operations

type LSN

type LSN uint64

type LSNParser

type LSNParser interface {
	ToString(LSN) string
	FromString(string) (LSN, error)
}

LSNParser handles the LSN type conversion

type Message

type Message struct {
	LSN            LSN
	Data           []byte
	ServerTime     time.Time
	ReplyRequested bool
}

Message contains the replication data

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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