config

package
v0.0.0-...-5eafe9c Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WriteClusterState

func WriteClusterState(ctx *cli.Context, state ClusterState) error

Types

type ClusterState

type ClusterState struct {
	Name      string `toml:"name"`
	NetworkID string `toml:"network_id"`

	Containers []string `toml:"containers"`

	RunState RunState `toml:"run_state"`

	EtcdContainerName       string   `toml:"etcd_container_name"`
	ControllerContainerName string   `toml:"controller_container_name"`
	RegistryContainerName   string   `toml:"registry_container_name"`
	WorkerContainerNames    []string `toml:"worker_container_names"`

	StorageDriver string `toml:"storage_driver"`
	StoragePool   string `toml:"storage_pool"`
}

func ClusterStateFromContext

func ClusterStateFromContext(ctx *cli.Context) (ClusterState, error)

type Config

type Config struct {
	ControllerLimitsCPU    int    `toml:"controller_limits_cpu"`
	ControllerLimitsMemory string `toml:"controller_limits_memory"`
	WorkerLimitsCPU        int    `toml:"worker_limits_cpu"`
	WorkerLimitsMemory     string `toml:"worker_limits_memory"`
	StoragePool            string `toml:"storage_pool"`
	RootFSSize             string `toml:"root_fs_size"`
	EnableInsecureRegistry bool   `toml:"enable_insecure_registry"`
}

func CLIConfigFromCLIContext

func CLIConfigFromCLIContext(context *cli.Context) (Config, error)

type RunState

type RunState int
const (
	Uninitialized RunState = iota
	Running
	Stopped
)

Jump to

Keyboard shortcuts

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