Documentation
¶
Index ¶
Constants ¶
View Source
const Prefix = "otter"
All environment variables will have this prefix unless otherwise defined in struct tags. For example, the conf.LogLevel environment variable will be OTTER_LOG_LEVEL because of this prefix and the split_words struct tag in the conf below.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Maintenance bool `default:"false" desc:"if true, the node will start in maintenance mode"`
LogLevel logger.LevelDecoder `split_words:"true" default:"info" desc:"specify the verbosity of logging (trace, debug, info, warn, error, fatal panic)"`
ConsoleLog bool `split_words:"true" default:"false" desc:"if true logs colorized human readable output instead of json"`
Server ServerConfig
Replica ReplicaConfig
Web WebConfig
// contains filtered or unexported fields
}
Config contains all of the configuration parameters for an otterdb instance and is loaded from the environment or a configuration file with reasonable defaults for values that are omitted. The Config should be validated in preparation for running the otterdb instance to ensure that all server operations work as expected.
func (Config) GetLogLevel ¶
type ReplicaConfig ¶
type ReplicaConfig struct {
Maintenance bool `env:"OTTER_MAINTENANCE" desc:"if true sets the replica to maintenance mode; inherited from parent"`
Enabled bool `default:"false" desc:"if false, the replica service will not be started, e.g. run as a single node cluster"`
BindAddr string `default:":2204" split_words:"true" desc:"the ip address and port to bind the replica server on"`
}
func (ReplicaConfig) Validate ¶ added in v0.2.0
func (c ReplicaConfig) Validate() error
type ServerConfig ¶
type ServerConfig struct {
Maintenance bool `env:"OTTER_MAINTENANCE" desc:"if true sets the server to maintenance mode; inherited from parent"`
Enabled bool `default:"true" desc:"if false, the client facing server will not be started, e.g. to uses this as a backup replica only"`
BindAddr string `default:":2202" split_words:"true" desc:"the ip address and port to bind the database server on"`
}
func (ServerConfig) Validate ¶ added in v0.2.0
func (c ServerConfig) Validate() error
type WebConfig ¶
type WebConfig struct {
Maintenance bool `env:"OTTER_MAINTENANCE" desc:"if true sets the web ui to maintenance mode; inherited from parent"`
Enabled bool `default:"false" desc:"set this to true to enable the web ui for the database (opt-in)"`
Mode string `default:"release" desc:"specify the mode of the web server (release, debug, test)"`
BindAddr string `default:":2208" split_words:"true" desc:"the ip address and port to bind the web server on"`
Origin string `` /* 140-byte string literal not displayed */
}
Click to show internal directories.
Click to hide internal directories.