config

package
v0.0.0-...-b371d68 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2024 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init(file string)

Types

type Config

type Config struct {
	Environment    string `ac/name:"env"`
	Datacenter     string
	Rack           string
	Error_mailto   string
	Error_mailfrom string
	Basedir        string
	Syslog         string
	TLS_cert       string // our cert - .crt
	TLS_key        string // our private key - .key
	TLS_root       string // root cert - .crt
	Save_status    string // filename
	Net_threads    int
	AE_threads     int
	Port_Server    int
	Seedpeer       []string `ac/validate:"ipport"`
	Allow          []string `ac/validate:"ipmask"`
	Monitor        []*Monitor
	Debug          map[string]bool
	Database       []*DBConf
}

func Cf

func Cf() *Config

type DBConf

type DBConf struct {
	Name         string
	Pathname     string
	Backend      string
	Secret       string
	Expire       int `ac/convert:"duration"`
	CacheSize    int
	FullPathName string
}

type Monitor

type Monitor struct {
	Protocol    string // ac, yb, http, [...]
	System      string
	Environment string `ac/name:"env"`
	Datacenter  string
	Rack        string
	Id          string
	Hostname    string
	Addr        string
	Port        int
	URL         string // for proto 'http'
}

Jump to

Keyboard shortcuts

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