config

package
v0.0.0-alpha1 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	Path        = "config/config.yaml"
	DefaultPath = "default.config.yaml"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	Name string `env-required:"true" yaml:"name"`
}

App -.

type Config

type Config struct {
	App      `yaml:"app"`
	HTTP     `yaml:"http"`
	Log      `yaml:"logger"`
	*Tracer  `yaml:"tracer"`
	Database `yaml:"database"`
}

Config -.

func NewConfig

func NewConfig() (*Config, error)

NewConfig returns app config.

type Database

type Database struct {
	*Listen `yaml:"listen"`
	Write   `env-required:"true" yaml:"write"`
}

Database -.

type HTTP

type HTTP struct {
	Port string `env-required:"true" yaml:"port"`
}

HTTP -.

type Listen

type Listen struct {
	Connection   string   `yaml:"connection"`
	PoolMax      int      `yaml:"pool_max"`
	URL          string   `yaml:"url"`
	SlotName     string   `yaml:"slot_name"`
	OutputPlugin string   `yaml:"output_plugin"`
	Tables       []string `yaml:"tables"`
}

type Log

type Log struct {
	Level string `env-required:"true" yaml:"log_level"`
}

Log -.

type Tracer

type Tracer struct {
	Exporter string `yaml:"exporter"`
	Endpoint string `yaml:"endpoint"`
	Disabled bool   `yaml:"disabled"`
}

Tracer -.

type Write

type Write struct {
	Connection string `env-required:"true" yaml:"connection"`
	PoolMax    int    `env-required:"true" yaml:"pool_max"`
	Database   string `env-required:"true" yaml:"database"`
	URI        string `env-required:"true" yaml:"uri"`
}

Jump to

Keyboard shortcuts

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