replication

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2024 License: MPL-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 Position

type Position [2]int64

func (Position) FirstToHexString

func (p Position) FirstToHexString() string

func (*Position) FromBytes

func (p *Position) FromBytes(data []byte) error

func (Position) LastToHexString

func (p Position) LastToHexString() string

func (Position) ToBytes

func (p Position) ToBytes() []byte

type Replication

type Replication struct {
}

func NewReplication

func NewReplication() *Replication

func (*Replication) Startup

func (r *Replication) Startup() error

type RoughReader

type RoughReader interface {
}

type Wal

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

func NewWal

func NewWal(opt WalOptions) *Wal

func (*Wal) CurrentPosition

func (w *Wal) CurrentPosition() (Position, error)

func (*Wal) RoughReader

func (w *Wal) RoughReader(pos Position) (RoughReader, error)

RoughReader returns a RoughReader for wal replaying If wal logs are missing between pos and earliest wal file, nil is returned as reader w/o any error If preparing reader failed, an error is returned

func (*Wal) Shutdown

func (w *Wal) Shutdown() error

func (*Wal) Startup

func (w *Wal) Startup() error

func (*Wal) Write

func (w *Wal) Write(data []byte) (Position, error)

func (*Wal) WriteLoop

func (w *Wal) WriteLoop()

type WalOptions

type WalOptions struct {
	FS afero.Fs
}

Jump to

Keyboard shortcuts

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