config

package
v1.3.2 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Listener ListenerCfg
	Database DatabaseCfg
	Logger   LoggerCfg
}

Config for wal-listener/

func (Config) Validate

func (c Config) Validate() error

Validate config data.

type DatabaseCfg

type DatabaseCfg struct {
	Host     string `valid:"required"`
	Port     uint16 `valid:"required"`
	Name     string `valid:"required"`
	User     string `valid:"required"`
	Password string `valid:"required"`
	Filter   FilterStruct
}

DatabaseCfg path of the PostgreSQL DB config.

type FilterStruct

type FilterStruct struct {
	Tables map[string]Table
}

FilterStruct incoming WAL message filter.

type ListenerCfg

type ListenerCfg struct {
	SlotName          string `valid:"required"`
	AckTimeout        time.Duration
	RefreshConnection time.Duration `valid:"required"`
	HeartbeatInterval time.Duration `valid:"required"`
}

ListenerCfg path of the listener config.

type LoggerCfg

type LoggerCfg struct {
	Caller        bool
	Level         string
	HumanReadable bool
}

LoggerCfg path of the logger config.

type Table

type Table struct {
	Actions []string
	Topic   string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL