config

package
v0.0.0-...-2045cfa Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppDef

type AppDef struct {
	// root path on disk for app
	AppRoot string `yaml:"root"`

	// Type of app (see enum below)
	Type AppType `yaml:"type"`

	// Healthz checks for app
	Healthz []Healthz `yaml:"healthz"`

	// Varz checks for app; used to get running version
	Varz *Varz `yaml:"varz"`
}

type AppType

type AppType int

AppType Enum

const (
	Unknown AppType = iota

	// An app that runs as an OS daemon
	Daemon

	// An app that starts from a script an serves traffic
	Online

	// A runtime executable or library
	Runtime
)

func (AppType) String

func (t AppType) String() string

String representations of AppType enum values

func (*AppType) UnmarshalYAML

func (t *AppType) UnmarshalYAML(unmarshal func(interface{}) error) error

Custom yaml deserializer

type Config

type Config struct {
	// Port for HTTPS API listener
	Port int `yaml:"port"`

	// HTTPS Timeouts
	ReadTimeoutS  int `yaml:"readTimeoutS"`
	WriteTimeoutS int `yaml:"writeTimeoutS"`

	// TLS material locations
	KeyPath string `yaml:"keyPath"`
	CrtPath string `yaml:"crtPath"`

	// APT binary path
	AptPath string `yaml:"aptPath"`

	// Known apps
	AppDefs map[string]AppDef `yaml:"appDefs"`

	// Min log level
	LogLevel string `yaml:"logLevel"`

	// Status polling pause interval
	PollIntervalS int `yaml:"pollIntervalS"`

	// Batch deploy pause interval
	DeployIntervalS int `yaml:"deployIntervalS"`

	// Deploy converge on timeout
	ConvergeTimeoutS int `yaml:"convergeTimeoutS"`

	// TLS Settings
	TLS *common.TLSConfig `yaml:"tls"`
}

func Load

func Load(configPath string) *Config

Load the config from provided path

type Healthz

type Healthz struct {
	// Port number to check
	Port int

	// Whether or not to negotiate SSL/TLS
	TLS bool
}

type Varz

type Varz struct {
	// Port number to check
	Port int

	// Whether or not to negotiate SSL/TLS
	TLS bool
}

Jump to

Keyboard shortcuts

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