Documentation
¶
Index ¶
- Constants
- func EncodeClusterBootstraps(s []ClusterBootstrap) string
- func Validate()
- type Auth
- type Cluster
- type ClusterBootstrap
- type Config
- type EnumClusterState
- type EnumLogLogger
- type EnumStoreBackend
- type FilePath
- type Log
- type Misc
- type Node
- type Security
- 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 )
View Source
const ( DefaultStoreBackend string = string(StoreBackendNuts) DefaultStoreNutsNodeNum int64 = 1 DefaultStoreNutsSync bool = false DefaultStoreNutsStrictMode bool = false DefaultStoreNutsDataDir string = "./data/nuts" )
View Source
const ( DefaultLogLogger string = string(LogLoggerZap) DefaultLogOutputDir string = "./data/logs" )
View Source
const (
DefaultClusterState string = string(ClusterStateNew)
)
Variables ¶
This section is empty.
Functions ¶
func EncodeClusterBootstraps ¶
func EncodeClusterBootstraps(s []ClusterBootstrap) string
Types ¶
type Cluster ¶
type Cluster struct {
// State enum: new, existing
State EnumClusterState `toml:"state"`
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"`
Security `toml:"security"`
Log `toml:"log"`
Misc `toml:"misc"`
Auth `toml:"auth"`
// contains filtered or unexported fields
}
func ReadFromArgs ¶
func ReadFromPath ¶
func (Config) ConfigFile ¶
func (r Config) ConfigFile() string
type EnumClusterState ¶
type EnumClusterState string
const ( ClusterStateNew EnumClusterState = "new" ClusterStateExisting EnumClusterState = "existing" )
func (EnumClusterState) Valid ¶
func (s EnumClusterState) Valid() error
type EnumLogLogger ¶
type EnumLogLogger string
const ( LogLoggerZap EnumLogLogger = "zap" LogLoggerInternal EnumLogLogger = "internal" )
func (EnumLogLogger) Valid ¶
func (l EnumLogLogger) 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"`
OutputDir string `toml:"output-dir"`
}
type Security ¶
type Security struct {
EnableTLS bool `toml:"enable-tls"`
EnablePeerTLS bool `toml:"enable-peer-tls"`
AutoTLS bool `toml:"auto-tls"`
PeerAutoTLS bool `toml:"peer-auto-tls"`
TLSCert string `toml:"tls-cert"`
TLSKey string `toml:"tls-key"`
PeerTLSCert string `toml:"peer-tls-cert"`
PeerTLSKey string `toml:"peer-tls-key"`
}
type Store ¶
type Store struct {
Backend EnumStoreBackend
Nuts StoreNuts
}
Click to show internal directories.
Click to hide internal directories.