Documentation
¶
Overview ¶
Package sendwal implements the WAL receiver
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrMessageReceiverClosed = errors.New("message receiver closed")
ErrMessageReceiverClosed is a fallback returned when the background receive loop of a messageReceiver has exited without recording an error, which should not normally happen.
Functions ¶
This section is empty.
Types ¶
type ParseReadReplicationSlotResult ¶
type ParseReadReplicationSlotResult struct {
SlotType string
RestartLSN pglogrepl.LSN
RestartTLI int
}
ParseReadReplicationSlotResult is the parsed result of the READ_REPLICATION_SLOT command.
func ParseReadReplicationSlot ¶
func ParseReadReplicationSlot(mrr *pgconn.MultiResultReader) (ParseReadReplicationSlotResult, error)
ParseReadReplicationSlot parses the result of the READ_REPLICATION_SLOT command.
func ReadReplicationSlot ¶
func ReadReplicationSlot( ctx context.Context, conn *pgconn.PgConn, slotName string, ) (ParseReadReplicationSlotResult, error)
ReadReplicationSlot executes the READ_REPLICATION_SLOT command.
type Process ¶
type Process struct {
// contains filtered or unexported fields
}
Process implements the WAL sender service.
func New ¶
func New(cfg *config.Data, logger log.Logger, client *grpcclient.Connection, sendToTier2 bool) *Process
New creates a new receiver.
func (*Process) ResetReplicationStatus ¶
ResetReplicationStatus resets the replication status on the server side and then drops the Klio replication slot.
type ReadReplicationSlotParserError ¶
type ReadReplicationSlotParserError struct {
// contains filtered or unexported fields
}
ReadReplicationSlotParserError is raised the answer to a READ_REPLICATION_SLOT query is not in the expected format.
func NewReplicationSlotParserError ¶
func NewReplicationSlotParserError(format string, args ...any) *ReadReplicationSlotParserError
NewReplicationSlotParserError creates a new ReplicationSlotParserError.
func (*ReadReplicationSlotParserError) Error ¶
func (e *ReadReplicationSlotParserError) Error() string
Error implements the error interface.
type UnexpectedCopydataMessageError ¶
type UnexpectedCopydataMessageError struct {
// contains filtered or unexported fields
}
UnexpectedCopydataMessageError is raised from the WAL receiver got a CopyData message of unknown type.
func NewUnexpectedCopydataMessageError ¶
func NewUnexpectedCopydataMessageError(msg []byte) *UnexpectedCopydataMessageError
NewUnexpectedCopydataMessageError creates a new unexpected copy data message.
func (*UnexpectedCopydataMessageError) Error ¶
func (e *UnexpectedCopydataMessageError) Error() string
Error implements the error interface.
type UnexpectedMessageError ¶
type UnexpectedMessageError struct {
// contains filtered or unexported fields
}
UnexpectedMessageError is raised from the WAL receiver got a CopyData message of unknown type.
func NewUnexpectedMessageError ¶
func NewUnexpectedMessageError(msg pgproto3.BackendMessage) *UnexpectedMessageError
NewUnexpectedMessageError creates a new unexpected copy data message.
func (*UnexpectedMessageError) Error ¶
func (e *UnexpectedMessageError) Error() string
Error implements the error interface.
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
Package buffer implements a WAL receiver buffer
|
Package buffer implements a WAL receiver buffer |
|
Package infrastructure is the layer that directly interacts with external components.
|
Package infrastructure is the layer that directly interacts with external components. |