Documentation
¶
Index ¶
- Constants
- func BindEnvVar(value flag.Value, name string)
- func EncodeClusterBootstraps(s []ClusterBootstrap) string
- func EnvBoolVar(p *bool, name string, value bool)
- func EnvInt64Var(p *int64, name string, value int64)
- func EnvStringVar(p *string, name string, value string)
- type Auth
- type Cluster
- type ClusterBootstrap
- type Config
- type EnumLogLogger
- type EnumNutsRWMode
- type EnumStoreBackend
- type FilePath
- type Log
- type Misc
- type Node
- type ServerEnv
- type Store
- type StoreNuts
- type Validator
Constants ¶
View Source
const ( DefaultNodeDataDir string = "./data" DefaultNodeListenPeerAddr string = "127.0.0.1:5290" DefaultNodeListenClientAddr string = "127.0.0.1:5230" DefaultNodeMaxSnapshots uint32 = 5 DefaultNodeRequestsMerged bool = false )
View Source
const ( DefaultStoreBackend = string(StoreBackendNuts) DefaultStoreNutsNodeNum int64 = 1 DefaultStoreNutsSync bool = false DefaultStoreNutsStrictMode bool = false DefaultStoreNutsRWMode string = "fileio" )
View Source
const DefaultConfigPath string = "./config.toml"
View Source
const (
DefaultLogLogger = string(LogLoggerZap)
)
Variables ¶
This section is empty.
Functions ¶
func BindEnvVar ¶
func EncodeClusterBootstraps ¶
func EncodeClusterBootstraps(s []ClusterBootstrap) string
func EnvBoolVar ¶
func EnvInt64Var ¶
func EnvStringVar ¶
Types ¶
type Cluster ¶
type Cluster struct {
Token string `toml:"token"`
Bootstrap []ClusterBootstrap `toml:"bootstrap"`
}
type ClusterBootstrap ¶
func DecodeClusterBootstraps ¶
func DecodeClusterBootstraps(s string) ([]ClusterBootstrap, error)
type Config ¶
type Config struct {
Node `toml:"node"`
Store `toml:"store"`
Cluster `toml:"cluster"`
Log `toml:"log"`
Misc `toml:"misc"`
Auth `toml:"auth"`
// contains filtered or unexported fields
}
func ReadFromArgs ¶
func ReadFromEnv ¶
func ReadFromEnv() *Config
func ReadFromPath ¶
func (Config) ConfigFile ¶
func (r Config) ConfigFile() string
type EnumLogLogger ¶
type EnumLogLogger string
const ( LogLoggerZap EnumLogLogger = "zap" LogLoggerInternal EnumLogLogger = "internal" )
func (EnumLogLogger) Valid ¶
func (l EnumLogLogger) Valid() error
type EnumNutsRWMode ¶
type EnumNutsRWMode string
const ( NutsRWModeFileIO EnumNutsRWMode = "fileio" NutsRWModeMMap EnumNutsRWMode = "mmap" )
func (EnumNutsRWMode) Valid ¶
func (m EnumNutsRWMode) Valid() error
type EnumStoreBackend ¶
type EnumStoreBackend string
const (
StoreBackendNuts EnumStoreBackend = "nuts"
)
func (EnumStoreBackend) Valid ¶
func (b EnumStoreBackend) Valid() error
type Log ¶
type Log struct {
Debug bool `toml:"debug"`
// Logger enum: zap, internal
Logger EnumLogLogger `toml:"logger"`
}
type Store ¶
type Store struct {
Backend EnumStoreBackend `toml:"backend"`
Nuts StoreNuts `toml:"nuts"`
}
Click to show internal directories.
Click to hide internal directories.