config

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2021 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"`
	BrokerChoriaPassword    string                           `json:"broker_choria_password"`
	Management              *backplane.StandardConfiguration `json:"management" yaml:"management"`
	CertDenyList            []string                         `json:"cert_deny_list"`
	JWTVerifyCert           string                           `json:"jwt_verify_cert"`
	RegoPolicy              string                           `json:"rego_policy"`

	Features struct {
		PKI    bool `json:"pki"`
		JWT    bool `json:"jwt"`
		Broker bool `json:"broker"`
	} `json:"features"`

	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) FactData

func (c *Config) FactData() interface{}

FactData implements backplane.InfoSource

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

func (*Config) Version

func (c *Config) Version() string

Version implements backplane.InfoSource

Jump to

Keyboard shortcuts

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