config

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetupClient added in v0.6.0

func SetupClient(ctx context.Context, config *Configuration) (*client.Client, error)

Types

type Configuration

type Configuration struct {
	Image     Image                `json:"image,omitzero"`
	Container Container            `json:"container,omitzero"`
	User      User                 `json:"-"`
	Profiles  map[string]Container `json:"profiles,omitempty"`
	Endpoint  string               `json:"endpoint,omitempty"`
	Version   string               `json:"-"`
	ConfigDir string               `json:"-"`
}

func Configure

func Configure() (Configuration, error)

func (*Configuration) Save

func (c *Configuration) Save() error

type Container

type Container struct {
	EnvironmentVariables     map[string]string `json:"env,omitempty"`
	EnvironmentVariablesFile string            `json:"envFile,omitempty"`
	Volumes                  map[string]string `json:"volumes,omitempty"`
	Networks                 []string          `json:"networks,omitempty"`
	ExtraHosts               map[string]string `json:"extraHosts,omitempty"`
	User                     User              `json:"user,omitzero"`
	Image                    string            `json:"image,omitempty"`
	CPUs                     float64           `json:"cpus,omitempty"`
	Memory                   string            `json:"memory,omitempty"`
	MaxPIDs                  uint8             `json:"maxPids,omitempty"`
	// Inherit non set values from global container config.
	// Only applies to profile container configs.
	Inherit bool `json:"inherit,omitempty"`
}

type Image

type Image struct {
	User     User   `json:"user,omitzero"`
	Template string `json:"template,omitempty"`
	Base     string `json:"-"`
}

type User added in v0.15.0

type User struct {
	Username string `json:"username"`
	HomeDir  string `json:"-"`
	UID      string `json:"uid"`
	GID      string `json:"gid"`
}

func (User) IsZero added in v0.15.0

func (u User) IsZero() bool

Jump to

Keyboard shortcuts

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