config

package
v0.0.0-...-8ad9259 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2021 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Config

func Config(configName string) (cfg interface{})

Config function loads and returns the config based on `configName` parameter

Types

type ClientConfig

type ClientConfig struct {
	Version string `yaml:"version"`
	Server  struct {
		Host    string        `yaml:"host"`
		Port    int           `yaml:"port"`
		Timeout time.Duration `yaml:"timeout"`
	} `yaml:"server"`
	Wal struct {
		Datadir string `yaml:"datadir"`
	} `yaml:"wal"`
}

ClientConfig client

type ServerConfig

type ServerConfig struct {
	Server struct {
		Host    string        `yaml:"host"`
		Port    int           `yaml:"port"`
		DB      string        `yaml:"dbname"`
		Timeout time.Duration `yaml:"timeout"`
	} `yaml:"server"`
	Wal struct {
		Datadir string `yaml:"datadir"`
	} `yaml:"wal"`
}

ServerConfig server

Jump to

Keyboard shortcuts

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