conf

package
v0.0.0-...-f12882f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 28, 2020 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FlagsForApp

func FlagsForApp(prefix string, config *AppConfig) *pflag.FlagSet

func FlagsForRuntime

func FlagsForRuntime(prefix string, config *RuntimeConfig) *pflag.FlagSet

func ReadConfig

func ReadConfig(
	cmd *cobra.Command,
	configFile *string,
	cliLogConfig *log.Config,
	config *Config,
) (context.Context, error)

Types

type AppConfig

type AppConfig struct {
	Log log.ConfigSet `json:"log" yaml:"log"`

	// Endpoint url for the extension server of arhat
	Endpoint string `json:"endpoint" yaml:"endpoint"`

	// affects udp packaet payload size
	MaxDataMessagePayload int `json:"maxDataMessagePayload" yaml:"maxDataMessagePayload"`

	// TLS Client config for the endpoint
	TLS tlshelper.TLSConfig `json:"tls" yaml:"tls"`
}

type Config

type Config struct {
	App AppConfig `json:"app" yaml:"app"`

	Runtime RuntimeConfig            `json:"runtime" yaml:"runtime"`
	Storage storageutil.ClientConfig `json:"storage" yaml:"storage"`
}

nolint:lll

type RuntimeConfig

type RuntimeConfig struct {
	DataDir string `json:"dataDir" yaml:"dataDir"`

	PauseImage   string   `json:"pauseImage" yaml:"pauseImage"`
	PauseCommand []string `json:"pauseCommand" yaml:"pauseCommand"`

	ImageActionTimeout time.Duration `json:"imageActionTimeout" yaml:"imageActionTimeout"`
	PodActionTimeout   time.Duration `json:"podActionTimeout" yaml:"podActionTimeout"`

	AbbotRequestSubCmd string `json:"abbotRequestSubCmd" yaml:"abbotRequestSubCmd"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL