Documentation ¶
Index ¶
Constants ¶
View Source
const DEFAULT_CONFIG_FILE = "/etc/echopilot/echopilot.json"
View Source
const DEFAULT_HOST = "localhost"
View Source
const DEFAULT_IP = "127.0.0.1"
View Source
const DEFAULT_PORT = 3000
View Source
const DEFAULT_TLS_CERT = "/etc/echopilot/tls/cert.pem"
View Source
const DEFAULT_TLS_ENABLED = true
View Source
const DEFAULT_TLS_KEY = "/etc/echopilot/tls/key.pem"
View Source
const DEFAULT_TLS_SKIP_VERIFY = false
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ReloadableConfig ¶
type ReloadableConfig struct { ConfigFile option.Option[string] `json:"configFile" env:"ECHOPILOT_CONFIG_FILE"` Host option.Option[string] `json:"serverHost" env:"ECHOPILOT_HOST"` IP option.Option[string] `json:"bindHost" env:"ECHOPILOT_BIND_IP"` Port option.Option[int] `json:"serverPort" env:"ECHOPILOT_PORT"` TlsCert option.Option[string] `json:"tlsCert" env:"ECHOPILOT_TLS_CERT"` TlsKey option.Option[string] `json:"tlsKey" env:"ECHOPILOT_TLS_KEY"` TlsEnabled option.Option[bool] `json:"tlsEnabled" env:"ECHOPILOT_TLS_ENABLED"` TlsSkipVerify option.Option[bool] `json:"tlsSkipVerify" env:"ECHOPILOT_TLS_SKIP_VERIFY"` }
Generic server configuration which can be reloaded on demand.
func NewFullReloadableConfig ¶
func NewFullReloadableConfig(flags *pflag.FlagSet) (*ReloadableConfig, error)
func NewReloadableConfigFromEnv ¶
func NewReloadableConfigFromEnv() (ReloadableConfig, error)
func NewReloadableConfigFromFile ¶
func NewReloadableConfigFromFile(ConfigFile string) (ReloadableConfig, error)
func NewReloadableConfigFromFlags ¶
func NewReloadableConfigFromFlags(flags *pflag.FlagSet) (ReloadableConfig, error)
func (*ReloadableConfig) Finalize ¶
func (r *ReloadableConfig) Finalize() StaticConfig
type ServerConfig ¶
type ServerConfig struct {
// contains filtered or unexported fields
}
func NewServerConfig ¶
func NewServerConfig(flags *pflag.FlagSet) (*ServerConfig, error)
func (*ServerConfig) GetTlsConfig ¶
func (c *ServerConfig) GetTlsConfig(update bool) (*tls.Config, error)
func (*ServerConfig) GetTlsEnabled ¶
func (esc *ServerConfig) GetTlsEnabled(update bool) (bool, error)
Click to show internal directories.
Click to hide internal directories.