mocks

package
v0.9.3 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2025 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler struct {
	StartReplicationFn        func(context.Context) error
	StartReplicationFromLSNFn func(context.Context, replication.LSN) error
	ReceiveMessageFn          func(context.Context, uint64) (*replication.Message, error)
	SyncLSNFn                 func(context.Context, replication.LSN, uint64) error
	DropReplicationSlotFn     func(ctx context.Context) error
	GetLSNParserFn            func() replication.LSNParser
	GetCurrentLSNFn           func(context.Context) (replication.LSN, error)
	ResetConnectionFn         func(ctx context.Context) error
	GetReplicationLagFn       func(context.Context) (int64, error)
	CloseFn                   func() error
	SyncLSNCalls              uint64
	ReceiveMessageCalls       uint64
}

func (*Handler) Close

func (m *Handler) Close() error

func (*Handler) DropReplicationSlot

func (m *Handler) DropReplicationSlot(ctx context.Context) error

func (*Handler) GetCurrentLSN added in v0.3.0

func (m *Handler) GetCurrentLSN(ctx context.Context) (replication.LSN, error)

func (*Handler) GetLSNParser

func (m *Handler) GetLSNParser() replication.LSNParser

func (*Handler) GetReceiveMessageCalls

func (m *Handler) GetReceiveMessageCalls() uint64

func (*Handler) GetReplicationLag added in v0.8.8

func (m *Handler) GetReplicationLag(ctx context.Context) (int64, error)

func (*Handler) GetSyncLSNCalls

func (m *Handler) GetSyncLSNCalls() uint64

func (*Handler) ReceiveMessage

func (m *Handler) ReceiveMessage(ctx context.Context) (*replication.Message, error)

func (*Handler) ResetConnection added in v0.8.8

func (m *Handler) ResetConnection(ctx context.Context) error

func (*Handler) StartReplication

func (m *Handler) StartReplication(ctx context.Context) error

func (*Handler) StartReplicationFromLSN added in v0.3.0

func (m *Handler) StartReplicationFromLSN(ctx context.Context, lsn replication.LSN) error

func (*Handler) SyncLSN

func (m *Handler) SyncLSN(ctx context.Context, lsn replication.LSN) error

type LSNParser

type LSNParser struct {
	ToStringFn   func(replication.LSN) string
	FromStringFn func(string) (replication.LSN, error)
}

func (*LSNParser) FromString

func (m *LSNParser) FromString(lsn string) (replication.LSN, error)

func (*LSNParser) ToString

func (m *LSNParser) ToString(lsn replication.LSN) string

Jump to

Keyboard shortcuts

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