Documentation ¶
Index ¶
- func FlagsForArhatHostConfig(prefix string, config *HostConfig) *pflag.FlagSet
- func FlagsForExtensionConfig(prefix string, config *ExtensionConfig) *pflag.FlagSet
- func ReadConfig(flags *pflag.FlagSet, configFile *string, cliLogConfig *log.Config, ...) (context.Context, error)
- type AppConfig
- type Config
- type ConnectivityConfig
- type ConnectivityMethod
- type ExtensionConfig
- type ExtensionEndpoint
- type HostConfig
- type NetworkConfig
- type NodeConfig
- type NodeExtInfo
- type PeripheralExtensionConfig
- type RuntimeExtensionConfig
- type ValueFromSpec
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FlagsForArhatHostConfig ¶
func FlagsForArhatHostConfig(prefix string, config *HostConfig) *pflag.FlagSet
func FlagsForExtensionConfig ¶
func FlagsForExtensionConfig(prefix string, config *ExtensionConfig) *pflag.FlagSet
Types ¶
type AppConfig ¶
type AppConfig struct { Log log.ConfigSet `json:"log" yaml:"log"` Host HostConfig `json:"host" yaml:"host"` Node NodeConfig `json:"node" yaml:"node"` PProf perfhelper.PProfConfig `json:"pprof" yaml:"pprof"` }
AppConfig configuration for arhat application behavior
type Config ¶
type Config struct { Arhat AppConfig `json:"arhat" yaml:"arhat"` Connectivity ConnectivityConfig `json:"connectivity" yaml:"connectivity"` Storage storageutil.ClientConfig `json:"storage" yaml:"storage"` Network NetworkConfig `json:"network" yaml:"network"` Extension ExtensionConfig `json:"extension" yaml:"extension"` }
Config
type ConnectivityConfig ¶
type ConnectivityConfig struct { DialTimeout time.Duration `json:"dialTimeout" yaml:"dialTimeout"` InitialBackoff time.Duration `json:"initialBackoff" yaml:"initialBackoff"` MaxBackoff time.Duration `json:"maxBackoff" yaml:"maxBackoff"` BackoffFactor float64 `json:"backoffFactor" yaml:"backoffFactor"` Methods []ConnectivityMethod `json:"methods" yaml:"methods"` }
ConnectivityConfig configuration for connectivity part in arhat
type ConnectivityMethod ¶
type ConnectivityMethod struct { Name string `json:"name" yaml:"name"` Priority int `json:"priority" yaml:"priority"` Config interface{} `json:"config" yaml:"config"` }
func (*ConnectivityMethod) UnmarshalJSON ¶
func (c *ConnectivityMethod) UnmarshalJSON(data []byte) error
func (*ConnectivityMethod) UnmarshalYAML ¶
func (c *ConnectivityMethod) UnmarshalYAML(value *yaml.Node) error
type ExtensionConfig ¶
type ExtensionConfig struct { Enabled bool `json:"enabled" yaml:"enabled"` Endpoints []ExtensionEndpoint `json:"endpoints" yaml:"endpoints"` Peripheral PeripheralExtensionConfig `json:"peripheral" yaml:"peripheral"` Runtime RuntimeExtensionConfig `json:"runtime" yaml:"runtime"` }
nolint:maligned
type ExtensionEndpoint ¶
type ExtensionEndpoint struct { Listen string `json:"listen" yaml:"listen"` TLS struct { tlshelper.TLSConfig `json:",inline" yaml:",inline"` VerifyClientCert bool `json:"verifyClientCert" yaml:"verifyClientCert"` } `json:"tls" yaml:"tls"` KeepaliveInterval time.Duration `json:"keepaliveInterval" yaml:"keepaliveInterval"` MessageTimeout time.Duration `json:"messageTimeout" yaml:"messageTimeout"` }
type HostConfig ¶
type HostConfig struct { RootFS string `json:"rootfs" yaml:"rootfs"` UID *int `json:"uid" yaml:"uid"` GID *int `json:"gid" yaml:"gid"` AllowAttach bool `json:"allowAttach" yaml:"allowAttach"` AllowExec bool `json:"allowExec" yaml:"allowExec"` AllowLog bool `json:"allowLog" yaml:"allowLog"` AllowPortForward bool `json:"allowPortForward" yaml:"allowPortForward"` }
type NetworkConfig ¶
type NodeConfig ¶
type NodeConfig struct { MachineIDFrom ValueFromSpec `json:"machineIDFrom" yaml:"machineIDFrom"` ExtInfo []NodeExtInfo `json:"extInfo" yaml:"extInfo"` }
type NodeExtInfo ¶
type NodeExtInfo struct { ValueFrom ValueFromSpec `json:"valueFrom" yaml:"valueFrom"` ValueType string `json:"valueType" yaml:"valueType"` Operator string `json:"operator" yaml:"operator"` ApplyTo string `json:"applyTo" yaml:"applyTo"` }
type PeripheralExtensionConfig ¶
Click to show internal directories.
Click to hide internal directories.