config

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MergeMaps

func MergeMaps[K string, V any](m1 map[K]V, m2 map[K]V) map[K]V

MergeMaps takes two maps and returns a combined map, where KV pairs in the second map arg take precedence over the first.

func ValidPresets added in v1.4.0

func ValidPresets() []string

ValidPresets returns the sorted list of available preset names.

Types

type Config

type Config struct {
	Juju      jujuConfig     `mapstructure:"juju"`
	Providers providerConfig `mapstructure:"providers"`
	Host      hostConfig     `mapstructure:"host"`

	// The following are added at runtime according to CLI flags
	Overrides ConfigOverrides `mapstructure:"overrides"`
	Status    Status          `mapstructure:"status"`
	Verbose   bool            `mapstructure:"verbose" yaml:"-"`
	Trace     bool            `mapstructure:"trace" yaml:"-"`
	DryRun    bool            `mapstructure:"-" yaml:"-"`
}

Config represents concierge's configuration format.

func NewConfig

func NewConfig(cmd *cobra.Command, flags *pflag.FlagSet) (*Config, error)

func Preset

func Preset(preset string) (*Config, error)

Preset returns a configuration preset by name.

type ConfigOverrides

type ConfigOverrides struct {
	DisableJuju       bool
	K8sChannel        string
	JujuChannel       string
	MicroK8sChannel   string
	LXDChannel        string
	CharmcraftChannel string
	SnapcraftChannel  string
	RockcraftChannel  string

	GoogleCredentialFile string

	ExtraSnaps []string
	ExtraDebs  []string
}

type ImageRegistryConfig added in v1.4.0

type ImageRegistryConfig struct {
	URL      string `mapstructure:"url"`
	Username string `mapstructure:"username"`
	Password string `mapstructure:"password"`
}

ImageRegistryConfig represents configuration for an image registry mirror.

type SnapConfig

type SnapConfig struct {
	// Channel is the channel from which to install the snap. If omitted, the default behaviour is decided by snapd.
	Channel string `mapstructure:"channel"`
	// Connections is a list of snap connections to form.
	Connections []string `mapstructure:"connections"`
}

SnapConfig represents the configuration for a specific snap to be installed.

type Status

type Status int

Status represents the status of concierge on a given machine.

const (
	Provisioning Status = iota
	Succeeded
	Failed
)

func (Status) String

func (s Status) String() string

String returns a string representation of a given concierge status.

Jump to

Keyboard shortcuts

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