config

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2023 License: Apache-2.0 Imports: 2 Imported by: 1

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
	Monitoring MonitoringCfg
}

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"`
}

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"`
	Filter            FilterStruct
	TopicsMap         map[string]string
}

ListenerCfg path of the listener config.

type LoggerCfg

type LoggerCfg struct {
	Caller bool
	Level  string
	Format string
}

LoggerCfg path of the logger config.

type MonitoringCfg

type MonitoringCfg struct {
	SentryDSN string
	PromAddr  string
}

MonitoringCfg monitoring configuration.

type NatsCfg

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

NatsCfg path of the NATS config.

Jump to

Keyboard shortcuts

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