Documentation
¶
Index ¶
- type CLIFlags
- type Config
- type ContainerdConfig
- func (c *ContainerdConfig) GetBinaryPath() string
- func (c *ContainerdConfig) GetSocketPath() string
- func (c *ContainerdConfig) GetStartEmbedded() bool
- func (c *ContainerdConfig) SetBinaryPath(v string)
- func (c *ContainerdConfig) SetSocketPath(v string)
- func (c *ContainerdConfig) SetStartEmbedded(v bool)
- func (c *ContainerdConfig) Validate() error
- type EtcdConfig
- func (c *EtcdConfig) GetClientPort() int
- func (c *EtcdConfig) GetHTTPClientPort() int
- func (c *EtcdConfig) GetPeerPort() int
- func (c *EtcdConfig) GetPrefix() string
- func (c *EtcdConfig) GetStartEmbedded() bool
- func (c *EtcdConfig) SetClientPort(v int)
- func (c *EtcdConfig) SetHTTPClientPort(v int)
- func (c *EtcdConfig) SetPeerPort(v int)
- func (c *EtcdConfig) SetPrefix(v string)
- func (c *EtcdConfig) SetStartEmbedded(v bool)
- func (c *EtcdConfig) Validate() error
- type ServerConfig
- func (c *ServerConfig) GetAddress() string
- func (c *ServerConfig) GetConfigClusterName() string
- func (c *ServerConfig) GetDataPath() string
- func (c *ServerConfig) GetHTTPRequestTimeout() int
- func (c *ServerConfig) GetReleasePath() string
- func (c *ServerConfig) GetRunnerAddress() string
- func (c *ServerConfig) GetRunnerID() string
- func (c *ServerConfig) GetSkipClientConfig() bool
- func (c *ServerConfig) GetStopSandboxesOnShutdown() bool
- func (c *ServerConfig) HTTPRequestTimeoutDuration() time.Duration
- func (c *ServerConfig) SetAddress(v string)
- func (c *ServerConfig) SetConfigClusterName(v string)
- func (c *ServerConfig) SetDataPath(v string)
- func (c *ServerConfig) SetHTTPRequestTimeout(v int)
- func (c *ServerConfig) SetReleasePath(v string)
- func (c *ServerConfig) SetRunnerAddress(v string)
- func (c *ServerConfig) SetRunnerID(v string)
- func (c *ServerConfig) SetSkipClientConfig(v bool)
- func (c *ServerConfig) SetStopSandboxesOnShutdown(v bool)
- func (c *ServerConfig) Validate() error
- type TLSConfig
- func (c *TLSConfig) GetAcmeDNSProvider() string
- func (c *TLSConfig) GetAcmeEmail() string
- func (c *TLSConfig) GetStandardTLS() bool
- func (c *TLSConfig) SetAcmeDNSProvider(v string)
- func (c *TLSConfig) SetAcmeEmail(v string)
- func (c *TLSConfig) SetStandardTLS(v bool)
- func (c *TLSConfig) Validate() error
- type VictoriaLogsConfig
- func (c *VictoriaLogsConfig) GetAddress() string
- func (c *VictoriaLogsConfig) GetHTTPPort() int
- func (c *VictoriaLogsConfig) GetRetentionPeriod() string
- func (c *VictoriaLogsConfig) GetStartEmbedded() bool
- func (c *VictoriaLogsConfig) SetAddress(v string)
- func (c *VictoriaLogsConfig) SetHTTPPort(v int)
- func (c *VictoriaLogsConfig) SetRetentionPeriod(v string)
- func (c *VictoriaLogsConfig) SetStartEmbedded(v bool)
- func (c *VictoriaLogsConfig) Validate() error
- type VictoriaMetricsConfig
- func (c *VictoriaMetricsConfig) GetAddress() string
- func (c *VictoriaMetricsConfig) GetHTTPPort() int
- func (c *VictoriaMetricsConfig) GetRetentionPeriod() string
- func (c *VictoriaMetricsConfig) GetStartEmbedded() bool
- func (c *VictoriaMetricsConfig) SetAddress(v string)
- func (c *VictoriaMetricsConfig) SetHTTPPort(v int)
- func (c *VictoriaMetricsConfig) SetRetentionPeriod(v string)
- func (c *VictoriaMetricsConfig) SetStartEmbedded(v bool)
- func (c *VictoriaMetricsConfig) Validate() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CLIFlags ¶
type CLIFlags struct {
ConfigFile *string `long:"config" description:"Path to configuration file"`
Mode *string `long:"mode" short:"m" description:"Server mode: standalone (default), distributed (experimental)"`
ContainerdConfigBinaryPath *string `long:"containerd-binary" description:"Path to containerd binary"`
ContainerdConfigSocketPath *string `long:"containerd-socket" description:"Path to containerd socket"`
ContainerdConfigStartEmbedded *bool `long:"start-containerd" description:"Start embedded containerd daemon"`
EtcdConfigClientPort *int `long:"etcd-client-port" description:"Etcd client port"`
EtcdConfigEndpoints []string `long:"etcd" short:"e" description:"Etcd endpoints"`
EtcdConfigHTTPClientPort *int `long:"etcd-http-client-port" description:"Etcd HTTP client port"`
EtcdConfigPeerPort *int `long:"etcd-peer-port" description:"Etcd peer port"`
EtcdConfigPrefix *string `long:"etcd-prefix" short:"p" description:"Etcd prefix"`
EtcdConfigStartEmbedded *bool `long:"start-etcd" description:"Start embedded etcd server"`
ServerConfigAddress *string `long:"address" short:"a" description:"Address to listen on (host:port). For IPv6 use brackets, e.g. \"[::1]:8443\"."`
ServerConfigConfigClusterName *string `long:"config-cluster-name" short:"C" description:"Name of the cluster in client config"`
ServerConfigDataPath *string `long:"data-path" short:"d" description:"Data path"`
ServerConfigHTTPRequestTimeout *int `long:"http-request-timeout" description:"HTTP request timeout in seconds"`
ServerConfigReleasePath *string `long:"release-path" description:"Path to release directory containing binaries"`
ServerConfigRunnerAddress *string `long:"runner-address" description:"Runner address (host:port). For IPv6 use brackets, e.g. \"[::1]:8444\"."`
ServerConfigRunnerID *string `long:"runner-id" short:"r" description:"Runner ID"`
ServerConfigSkipClientConfig *bool `long:"skip-client-config" description:"Skip writing client config file to clientconfig.d"`
ServerConfigStopSandboxesOnShutdown *bool `long:"stop-sandboxes-on-shutdown" description:"Stop all sandboxes when server shuts down (useful in development)"`
TLSConfigAcmeDNSProvider *string `` /* 234-byte string literal not displayed */
TLSConfigAcmeEmail *string `` /* 128-byte string literal not displayed */
TLSConfigAdditionalIPs []string `long:"ips" description:"Additional IPs assigned to the server cert"`
TLSConfigAdditionalNames []string `long:"dns-names" description:"Additional DNS names assigned to the server cert"`
TLSConfigStandardTLS *bool `long:"serve-tls" description:"Expose the http ingress on standard TLS ports"`
VictoriaLogsConfigAddress *string `long:"victorialogs-addr" description:"VictoriaLogs address (when not using embedded)"`
VictoriaLogsConfigHTTPPort *int `long:"victorialogs-http-port" description:"VictoriaLogs HTTP port in embedded mode"`
VictoriaLogsConfigRetentionPeriod *string `long:"victorialogs-retention" description:"VictoriaLogs retention period (e.g. 30d, 2w, 1y)"`
VictoriaLogsConfigStartEmbedded *bool `long:"start-victorialogs" description:"Start embedded VictoriaLogs server"`
VictoriaMetricsConfigAddress *string `long:"victoriametrics-addr" description:"VictoriaMetrics address (when not using embedded)"`
VictoriaMetricsConfigHTTPPort *int `long:"victoriametrics-http-port" description:"VictoriaMetrics HTTP port in embedded mode"`
VictoriaMetricsConfigRetentionPeriod *string `long:"victoriametrics-retention" description:"VictoriaMetrics retention period in months"`
VictoriaMetricsConfigStartEmbedded *bool `long:"start-victoriametrics" description:"Start embedded VictoriaMetrics server"`
}
CLIFlags represents command-line flags for server configuration All fields are pointers to distinguish between set and unset values
func NewCLIFlags ¶
func NewCLIFlags() *CLIFlags
NewCLIFlags creates a new CLIFlags struct for parsing
type Config ¶
type Config struct {
Containerd ContainerdConfig `toml:"containerd"`
Etcd EtcdConfig `toml:"etcd"`
Mode *string `toml:"mode" env:"MIREN_MODE"`
Server ServerConfig `toml:"server"`
TLS TLSConfig `toml:"tls"`
Victorialogs VictoriaLogsConfig `toml:"victorialogs"`
Victoriametrics VictoriaMetricsConfig `toml:"victoriametrics"`
}
Config Complete server configuration from all sources
func Load ¶
Load loads configuration from all sources with proper precedence: CLI flags > Environment variables > Config file > Defaults
type ContainerdConfig ¶
type ContainerdConfig struct {
BinaryPath *string `toml:"binary_path" env:"MIREN_CONTAINERD_BINARY_PATH"`
SocketPath *string `toml:"socket_path" env:"MIREN_CONTAINERD_SOCKET_PATH"`
StartEmbedded *bool `toml:"start_embedded" env:"MIREN_CONTAINERD_START_EMBEDDED"`
}
ContainerdConfig Containerd configuration
func DefaultContainerdConfig ¶
func DefaultContainerdConfig() ContainerdConfig
DefaultContainerdConfig returns default ContainerdConfig
func (*ContainerdConfig) GetBinaryPath ¶
func (c *ContainerdConfig) GetBinaryPath() string
GetBinaryPath returns the value of BinaryPath or its zero value if nil
func (*ContainerdConfig) GetSocketPath ¶
func (c *ContainerdConfig) GetSocketPath() string
GetSocketPath returns the value of SocketPath or its zero value if nil
func (*ContainerdConfig) GetStartEmbedded ¶
func (c *ContainerdConfig) GetStartEmbedded() bool
GetStartEmbedded returns the value of StartEmbedded or its zero value if nil
func (*ContainerdConfig) SetBinaryPath ¶
func (c *ContainerdConfig) SetBinaryPath(v string)
SetBinaryPath sets the value of BinaryPath
func (*ContainerdConfig) SetSocketPath ¶
func (c *ContainerdConfig) SetSocketPath(v string)
SetSocketPath sets the value of SocketPath
func (*ContainerdConfig) SetStartEmbedded ¶
func (c *ContainerdConfig) SetStartEmbedded(v bool)
SetStartEmbedded sets the value of StartEmbedded
func (*ContainerdConfig) Validate ¶
func (c *ContainerdConfig) Validate() error
Validate validates ContainerdConfig
type EtcdConfig ¶
type EtcdConfig struct {
ClientPort *int `toml:"client_port" env:"MIREN_ETCD_CLIENT_PORT"`
Endpoints []string `toml:"endpoints" env:"MIREN_ETCD_ENDPOINTS"`
HTTPClientPort *int `toml:"http_client_port" env:"MIREN_ETCD_HTTP_CLIENT_PORT"`
PeerPort *int `toml:"peer_port" env:"MIREN_ETCD_PEER_PORT"`
Prefix *string `toml:"prefix" env:"MIREN_ETCD_PREFIX"`
StartEmbedded *bool `toml:"start_embedded" env:"MIREN_ETCD_START_EMBEDDED"`
}
EtcdConfig Etcd configuration
func DefaultEtcdConfig ¶
func DefaultEtcdConfig() EtcdConfig
DefaultEtcdConfig returns default EtcdConfig
func (*EtcdConfig) GetClientPort ¶
func (c *EtcdConfig) GetClientPort() int
GetClientPort returns the value of ClientPort or its zero value if nil
func (*EtcdConfig) GetHTTPClientPort ¶
func (c *EtcdConfig) GetHTTPClientPort() int
GetHTTPClientPort returns the value of HTTPClientPort or its zero value if nil
func (*EtcdConfig) GetPeerPort ¶
func (c *EtcdConfig) GetPeerPort() int
GetPeerPort returns the value of PeerPort or its zero value if nil
func (*EtcdConfig) GetPrefix ¶
func (c *EtcdConfig) GetPrefix() string
GetPrefix returns the value of Prefix or its zero value if nil
func (*EtcdConfig) GetStartEmbedded ¶
func (c *EtcdConfig) GetStartEmbedded() bool
GetStartEmbedded returns the value of StartEmbedded or its zero value if nil
func (*EtcdConfig) SetClientPort ¶
func (c *EtcdConfig) SetClientPort(v int)
SetClientPort sets the value of ClientPort
func (*EtcdConfig) SetHTTPClientPort ¶
func (c *EtcdConfig) SetHTTPClientPort(v int)
SetHTTPClientPort sets the value of HTTPClientPort
func (*EtcdConfig) SetPeerPort ¶
func (c *EtcdConfig) SetPeerPort(v int)
SetPeerPort sets the value of PeerPort
func (*EtcdConfig) SetPrefix ¶
func (c *EtcdConfig) SetPrefix(v string)
SetPrefix sets the value of Prefix
func (*EtcdConfig) SetStartEmbedded ¶
func (c *EtcdConfig) SetStartEmbedded(v bool)
SetStartEmbedded sets the value of StartEmbedded
type ServerConfig ¶
type ServerConfig struct {
Address *string `toml:"address" env:"MIREN_SERVER_ADDRESS"`
ConfigClusterName *string `toml:"config_cluster_name" env:"MIREN_SERVER_CONFIG_CLUSTER_NAME"`
DataPath *string `toml:"data_path" env:"MIREN_SERVER_DATA_PATH"`
HTTPRequestTimeout *int `toml:"http_request_timeout" env:"MIREN_SERVER_HTTP_REQUEST_TIMEOUT"`
ReleasePath *string `toml:"release_path" env:"MIREN_SERVER_RELEASE_PATH"`
RunnerAddress *string `toml:"runner_address" env:"MIREN_SERVER_RUNNER_ADDRESS"`
RunnerID *string `toml:"runner_id" env:"MIREN_SERVER_RUNNER_ID"`
SkipClientConfig *bool `toml:"skip_client_config" env:"MIREN_SERVER_SKIP_CLIENT_CONFIG"`
StopSandboxesOnShutdown *bool `toml:"stop_sandboxes_on_shutdown" env:"MIREN_SERVER_STOP_SANDBOXES_ON_SHUTDOWN"`
}
ServerConfig Core server settings
func DefaultServerConfig ¶
func DefaultServerConfig() ServerConfig
DefaultServerConfig returns default ServerConfig
func (*ServerConfig) GetAddress ¶
func (c *ServerConfig) GetAddress() string
GetAddress returns the value of Address or its zero value if nil
func (*ServerConfig) GetConfigClusterName ¶
func (c *ServerConfig) GetConfigClusterName() string
GetConfigClusterName returns the value of ConfigClusterName or its zero value if nil
func (*ServerConfig) GetDataPath ¶
func (c *ServerConfig) GetDataPath() string
GetDataPath returns the value of DataPath or its zero value if nil
func (*ServerConfig) GetHTTPRequestTimeout ¶
func (c *ServerConfig) GetHTTPRequestTimeout() int
GetHTTPRequestTimeout returns the value of HTTPRequestTimeout or its zero value if nil
func (*ServerConfig) GetReleasePath ¶
func (c *ServerConfig) GetReleasePath() string
GetReleasePath returns the value of ReleasePath or its zero value if nil
func (*ServerConfig) GetRunnerAddress ¶
func (c *ServerConfig) GetRunnerAddress() string
GetRunnerAddress returns the value of RunnerAddress or its zero value if nil
func (*ServerConfig) GetRunnerID ¶
func (c *ServerConfig) GetRunnerID() string
GetRunnerID returns the value of RunnerID or its zero value if nil
func (*ServerConfig) GetSkipClientConfig ¶
func (c *ServerConfig) GetSkipClientConfig() bool
GetSkipClientConfig returns the value of SkipClientConfig or its zero value if nil
func (*ServerConfig) GetStopSandboxesOnShutdown ¶
func (c *ServerConfig) GetStopSandboxesOnShutdown() bool
GetStopSandboxesOnShutdown returns the value of StopSandboxesOnShutdown or its zero value if nil
func (*ServerConfig) HTTPRequestTimeoutDuration ¶
func (c *ServerConfig) HTTPRequestTimeoutDuration() time.Duration
HTTPRequestTimeoutDuration returns the timeout as a time.Duration
func (*ServerConfig) SetAddress ¶
func (c *ServerConfig) SetAddress(v string)
SetAddress sets the value of Address
func (*ServerConfig) SetConfigClusterName ¶
func (c *ServerConfig) SetConfigClusterName(v string)
SetConfigClusterName sets the value of ConfigClusterName
func (*ServerConfig) SetDataPath ¶
func (c *ServerConfig) SetDataPath(v string)
SetDataPath sets the value of DataPath
func (*ServerConfig) SetHTTPRequestTimeout ¶
func (c *ServerConfig) SetHTTPRequestTimeout(v int)
SetHTTPRequestTimeout sets the value of HTTPRequestTimeout
func (*ServerConfig) SetReleasePath ¶
func (c *ServerConfig) SetReleasePath(v string)
SetReleasePath sets the value of ReleasePath
func (*ServerConfig) SetRunnerAddress ¶
func (c *ServerConfig) SetRunnerAddress(v string)
SetRunnerAddress sets the value of RunnerAddress
func (*ServerConfig) SetRunnerID ¶
func (c *ServerConfig) SetRunnerID(v string)
SetRunnerID sets the value of RunnerID
func (*ServerConfig) SetSkipClientConfig ¶
func (c *ServerConfig) SetSkipClientConfig(v bool)
SetSkipClientConfig sets the value of SkipClientConfig
func (*ServerConfig) SetStopSandboxesOnShutdown ¶
func (c *ServerConfig) SetStopSandboxesOnShutdown(v bool)
SetStopSandboxesOnShutdown sets the value of StopSandboxesOnShutdown
func (*ServerConfig) Validate ¶
func (c *ServerConfig) Validate() error
Validate validates ServerConfig
type TLSConfig ¶
type TLSConfig struct {
AcmeDNSProvider *string `toml:"acme_dns_provider" env:"MIREN_TLS_ACME_DNS_PROVIDER"`
AcmeEmail *string `toml:"acme_email" env:"MIREN_TLS_ACME_EMAIL"`
AdditionalIPs []string `toml:"additional_ips" env:"MIREN_TLS_ADDITIONAL_IPS"`
AdditionalNames []string `toml:"additional_names" env:"MIREN_TLS_ADDITIONAL_NAMES"`
StandardTLS *bool `toml:"standard_tls" env:"MIREN_TLS_STANDARD_TLS"`
}
TLSConfig TLS/certificate settings
func DefaultTLSConfig ¶
func DefaultTLSConfig() TLSConfig
DefaultTLSConfig returns default TLSConfig
func (*TLSConfig) GetAcmeDNSProvider ¶
GetAcmeDNSProvider returns the value of AcmeDNSProvider or its zero value if nil
func (*TLSConfig) GetAcmeEmail ¶
GetAcmeEmail returns the value of AcmeEmail or its zero value if nil
func (*TLSConfig) GetStandardTLS ¶
GetStandardTLS returns the value of StandardTLS or its zero value if nil
func (*TLSConfig) SetAcmeDNSProvider ¶
SetAcmeDNSProvider sets the value of AcmeDNSProvider
func (*TLSConfig) SetAcmeEmail ¶
SetAcmeEmail sets the value of AcmeEmail
func (*TLSConfig) SetStandardTLS ¶
SetStandardTLS sets the value of StandardTLS
type VictoriaLogsConfig ¶
type VictoriaLogsConfig struct {
Address *string `toml:"address" env:"MIREN_VICTORIALOGS_ADDRESS"`
HTTPPort *int `toml:"http_port" env:"MIREN_VICTORIALOGS_HTTP_PORT"`
RetentionPeriod *string `toml:"retention_period" env:"MIREN_VICTORIALOGS_RETENTION_PERIOD"`
StartEmbedded *bool `toml:"start_embedded" env:"MIREN_VICTORIALOGS_START_EMBEDDED"`
}
VictoriaLogsConfig VictoriaLogs configuration
func DefaultVictoriaLogsConfig ¶
func DefaultVictoriaLogsConfig() VictoriaLogsConfig
DefaultVictoriaLogsConfig returns default VictoriaLogsConfig
func (*VictoriaLogsConfig) GetAddress ¶
func (c *VictoriaLogsConfig) GetAddress() string
GetAddress returns the value of Address or its zero value if nil
func (*VictoriaLogsConfig) GetHTTPPort ¶
func (c *VictoriaLogsConfig) GetHTTPPort() int
GetHTTPPort returns the value of HTTPPort or its zero value if nil
func (*VictoriaLogsConfig) GetRetentionPeriod ¶
func (c *VictoriaLogsConfig) GetRetentionPeriod() string
GetRetentionPeriod returns the value of RetentionPeriod or its zero value if nil
func (*VictoriaLogsConfig) GetStartEmbedded ¶
func (c *VictoriaLogsConfig) GetStartEmbedded() bool
GetStartEmbedded returns the value of StartEmbedded or its zero value if nil
func (*VictoriaLogsConfig) SetAddress ¶
func (c *VictoriaLogsConfig) SetAddress(v string)
SetAddress sets the value of Address
func (*VictoriaLogsConfig) SetHTTPPort ¶
func (c *VictoriaLogsConfig) SetHTTPPort(v int)
SetHTTPPort sets the value of HTTPPort
func (*VictoriaLogsConfig) SetRetentionPeriod ¶
func (c *VictoriaLogsConfig) SetRetentionPeriod(v string)
SetRetentionPeriod sets the value of RetentionPeriod
func (*VictoriaLogsConfig) SetStartEmbedded ¶
func (c *VictoriaLogsConfig) SetStartEmbedded(v bool)
SetStartEmbedded sets the value of StartEmbedded
func (*VictoriaLogsConfig) Validate ¶
func (c *VictoriaLogsConfig) Validate() error
Validate validates VictoriaLogsConfig
type VictoriaMetricsConfig ¶
type VictoriaMetricsConfig struct {
Address *string `toml:"address" env:"MIREN_VICTORIAMETRICS_ADDRESS"`
HTTPPort *int `toml:"http_port" env:"MIREN_VICTORIAMETRICS_HTTP_PORT"`
RetentionPeriod *string `toml:"retention_period" env:"MIREN_VICTORIAMETRICS_RETENTION_PERIOD"`
StartEmbedded *bool `toml:"start_embedded" env:"MIREN_VICTORIAMETRICS_START_EMBEDDED"`
}
VictoriaMetricsConfig VictoriaMetrics configuration
func DefaultVictoriaMetricsConfig ¶
func DefaultVictoriaMetricsConfig() VictoriaMetricsConfig
DefaultVictoriaMetricsConfig returns default VictoriaMetricsConfig
func (*VictoriaMetricsConfig) GetAddress ¶
func (c *VictoriaMetricsConfig) GetAddress() string
GetAddress returns the value of Address or its zero value if nil
func (*VictoriaMetricsConfig) GetHTTPPort ¶
func (c *VictoriaMetricsConfig) GetHTTPPort() int
GetHTTPPort returns the value of HTTPPort or its zero value if nil
func (*VictoriaMetricsConfig) GetRetentionPeriod ¶
func (c *VictoriaMetricsConfig) GetRetentionPeriod() string
GetRetentionPeriod returns the value of RetentionPeriod or its zero value if nil
func (*VictoriaMetricsConfig) GetStartEmbedded ¶
func (c *VictoriaMetricsConfig) GetStartEmbedded() bool
GetStartEmbedded returns the value of StartEmbedded or its zero value if nil
func (*VictoriaMetricsConfig) SetAddress ¶
func (c *VictoriaMetricsConfig) SetAddress(v string)
SetAddress sets the value of Address
func (*VictoriaMetricsConfig) SetHTTPPort ¶
func (c *VictoriaMetricsConfig) SetHTTPPort(v int)
SetHTTPPort sets the value of HTTPPort
func (*VictoriaMetricsConfig) SetRetentionPeriod ¶
func (c *VictoriaMetricsConfig) SetRetentionPeriod(v string)
SetRetentionPeriod sets the value of RetentionPeriod
func (*VictoriaMetricsConfig) SetStartEmbedded ¶
func (c *VictoriaMetricsConfig) SetStartEmbedded(v bool)
SetStartEmbedded sets the value of StartEmbedded
func (*VictoriaMetricsConfig) Validate ¶
func (c *VictoriaMetricsConfig) Validate() error
Validate validates VictoriaMetricsConfig