Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Conf ¶
type Conf struct { DatabaseURL string `env:"REPLICATE_DATABASE_URL" envDefault:"postgresql://127.0.0.1/postgres?replication=database"` StandbyMessageTimeout time.Duration `env:"REPLICATE_STANDBY_MESSAGE_TIMEOUT" envDefault:"10s"` }
Conf configures the package components
func ParseConfig ¶
ParseConfig parses the env variables into our config
type Delegate ¶
Delegate get's called to handle a change message. HandleChange should not block since it will slow down the message replication thread.
type DelegateFunc ¶
DelegateFunc implements Delegate
func (DelegateFunc) HandleChange ¶
func (f DelegateFunc) HandleChange(m pglogrepl.Message) error
HandleChange allos the func to handle any changes
type PublicationName ¶
type PublicationName string
PublicationName describes the name of the publication
var TemporaryPublication PublicationName = ""
TemporaryPublication is a publication name that is generated
type Replicate ¶
type Replicate struct {
// contains filtered or unexported fields
}
Replicate allows for logical replication
func New ¶
func New(lc fx.Lifecycle, logs *zap.Logger, cfg Conf, sn SlotName, pn PublicationName, del Delegate) (r *Replicate)
New inits the logical replication
Click to show internal directories.
Click to hide internal directories.