Documentation
¶
Index ¶
- Constants
- Variables
- func Initialize(replications []*Config) error
- func SendToHttpDestination(spec *DestinationSpec, change *Change) error
- func SendToSqsDestination(spec *DestinationSpec, change *Change) error
- func StartReplication(c *Config) error
- type Action
- type Change
- type Config
- type DestinationKind
- type DestinationList
- type DestinationSpec
- type Map
- type Mapping
- type Message
- type OldKeys
- type WalData
Constants ¶
View Source
const ( DefaultGroupCount = 10 DefaultRetryMaxAttempts = 10 )
Variables ¶
View Source
var IgnoreMessageError = errors.New("ignore this message and continue replication")
Functions ¶
func Initialize ¶
func SendToHttpDestination ¶
func SendToHttpDestination(spec *DestinationSpec, change *Change) error
func SendToSqsDestination ¶
func SendToSqsDestination(spec *DestinationSpec, change *Change) error
func StartReplication ¶
Types ¶
type Action ¶
type Action = string
const ActionDelete Action = "delete"
const ActionInsert Action = "insert"
const ActionUpdate Action = "update"
type Config ¶
type Config struct {
LogLevel zapcore.Level `cpln:"default:info;mapper:ZapLogLevelMapper"`
Host string `json:"-"`
Port string `json:"-"`
User string `json:"-"`
Database string `json:"-"`
Password string `json:"-"`
Slot string `json:"slot"`
WalAcknowledgementFrequency time.Duration `cpln:"default:30s" json:"-"`
Destinations DestinationList `json:"destinations"`
}
type DestinationKind ¶
type DestinationKind string
const ( DestinationKindSQS DestinationKind = "sqs" DestinationKindHTTP DestinationKind = "http" )
type DestinationList ¶
type DestinationList []*DestinationSpec
func (DestinationList) HandleChange ¶
func (l DestinationList) HandleChange(change *Change) error
func (DestinationList) Tables ¶
func (l DestinationList) Tables() []string
type DestinationSpec ¶
type DestinationSpec struct {
Map `json:",inline"`
Kind DestinationKind `json:"kind"`
Parameters map[string]any `json:"parameters"`
}
func (*DestinationSpec) HandleChange ¶
func (s *DestinationSpec) HandleChange(change *Change) error
type Map ¶
Click to show internal directories.
Click to hide internal directories.