Documentation
¶
Index ¶
Constants ¶
View Source
const ( ErrPostgresConnection = "db connection error" ErrReplicationConnection = "replication connection error" ErrPublishEvent = "publish message error" ErrUnmarshalMsg = "unmarshal wal message error" ErrAckWalMessage = "acknowledge wal message error" ErrSendStandbyStatus = "send standby status error" )
Constants with error text message
View Source
const ( StartServiceMessage = "service was started" StopServiceMessage = "service was stopped" )
Service info message.
Variables ¶
View Source
var ( ErrReplConnectionIsLost = errors.New("replication connection to postgres is lost") ErrConnectionIsLost = errors.New("db connection to postgres is lost") )
Variable with connection errors.
Functions ¶
This section is empty.
Types ¶
type Listener ¶
type Listener struct {
// contains filtered or unexported fields
}
Listener main service struct.
func New ¶
func New( cfg *config.Config, repo repository.Repository, repl replicator.Replicator, publ event.Publisher, parser wal.Parser, ) *Listener
New create and initialize new listener service instance.
func (*Listener) AckWalMessage ¶
AckWalMessage acknowledge received wal message.
func (*Listener) SendPeriodicHeartbeats ¶
SendPeriodicHeartbeats send periodic keep alive heartbeats to the server.
func (*Listener) SendStandbyStatus ¶
SendStandbyStatus sends a `StandbyStatus` object with the current RestartLSN value to the server.
Click to show internal directories.
Click to hide internal directories.