config

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2021 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
	Nats     NatsCfg
	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][]string
}

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 NatsCfg

type NatsCfg struct {
	Address     string `valid:"required"`
	ClusterID   string `valid:"required"`
	ClientID    string `valid:"required"`
	TopicPrefix string `valid:"required"`
}

NatsCfg path of the NATS config.

Jump to

Keyboard shortcuts

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