config

package
v0.15.1 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Version = "0.0.0"

Version is the version of the app

Functions

This section is empty.

Types

type Config

type Config struct {
	Workers                 int      `json:"workers"`
	Interval                string   `json:"interval"`
	Logfile                 string   `json:"logfile"`
	Loglevel                string   `json:"loglevel"`
	Helper                  string   `json:"helper"`
	Token                   string   `json:"token"`
	LifecycleComponent      string   `json:"lifecycle_component"`
	Insecure                bool     `json:"choria_insecure"`
	Site                    string   `json:"site"`
	MonitorPort             int      `json:"monitor_port"`
	BrokerPort              int      `json:"broker_port"`
	BrokerProvisionPassword string   `json:"broker_provisioning_password"`
	CertDenyList            []string `json:"cert_deny_list"`
	JWTVerifyCert           string   `json:"jwt_verify_cert"`
	JWTSigningKey           string   `json:"jwt_signing_key"`
	JWTSigningToken         string   `json:"jwt_signing_token"`
	ServerJWTValidity       string   `json:"server_jwt_validity"`
	RegoPolicy              string   `json:"rego_policy"`
	LeaderElection          bool     `json:"leader_election"`
	UpgradesRepo            string   `json:"upgrades_repository"`
	UpgradesOptional        bool     `json:"upgrades_optional"`

	Features struct {
		PKI             bool `json:"pki"`
		JWT             bool `json:"jwt"`
		ED25519         bool `json:"ed25519"`
		VersionUpgrades bool `json:"upgrades"`
	} `json:"features"`

	ServerJWTValidityDuration time.Duration `json:"-"`
	IntervalDuration          time.Duration `json:"-"`
	File                      string        `json:"-"`

	sync.Mutex
	// contains filtered or unexported fields
}

Config is the configuration structure

func Load

func Load(file string) (*Config, error)

Load reads configuration from a YAML file

func (*Config) Flip

func (c *Config) Flip()

Flip implements backplane.Pausable

func (*Config) Pause

func (c *Config) Pause()

Pause implements backplane.Pausable

func (*Config) Paused

func (c *Config) Paused() bool

Paused implements backplane.Pausable

func (*Config) Resume

func (c *Config) Resume()

Resume implements backplane.Pausable

Jump to

Keyboard shortcuts

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