mocks

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2024 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
	ReceiveMessageFn      func(context.Context, uint64) (*replication.Message, error)
	SyncLSNFn             func(context.Context, replication.LSN) error
	DropReplicationSlotFn func(ctx context.Context) error
	GetLSNParserFn        func() replication.LSNParser
	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) GetLSNParser

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

func (*Handler) GetReceiveMessageCalls

func (m *Handler) GetReceiveMessageCalls() uint64

func (*Handler) GetSyncLSNCalls

func (m *Handler) GetSyncLSNCalls() uint64

func (*Handler) ReceiveMessage

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

func (*Handler) StartReplication

func (m *Handler) StartReplication(ctx context.Context) 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