state

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2021 License: Apache-2.0, MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Projects = make(map[string]*Project)

Functions

func GetHomePath

func GetHomePath() string

Types

type Global

type Global struct {
	Conf     *config.Config
	ConfPath string
	Cmd      *cobra.Command
	Ret      int

	FlagForceLocal bool
	FlagHelp       bool
	FlagHelpAll    bool
	FlagLogDebug   bool
	FlagLogVerbose bool
	FlagProject    string
	FlagQuiet      bool
	FlagVersion    bool
}

func (*Global) CheckArgs

func (c *Global) CheckArgs(cmd *cobra.Command, args []string, minArgs int, maxArgs int) (bool, error)

func (*Global) ParseServers

func (c *Global) ParseServers(remotes ...string) ([]RemoteResource, error)

func (*Global) PostRun

func (c *Global) PostRun(cmd *cobra.Command, args []string) error

func (*Global) PreRun

func (c *Global) PreRun(cmd *cobra.Command, args []string) error

type Project

type Project struct {
	Name               string
	LXDName            string
	ContainerMountName string
	Profiles           []string
}

func GetProject

func GetProject(name string) *Project

func (*Project) CommonMountPath

func (p *Project) CommonMountPath() string

CommonMountPath is a project specific directory that is mounted into every container, to provide shared storage for provisioning scripts or configuration files.

func (*Project) ContainerCommonMountPath

func (p *Project) ContainerCommonMountPath() string

ContainerCommonMountPath determines the mount path for the CommonMountPath inside the container.

func (*Project) ContainerMountPath

func (p *Project) ContainerMountPath() string

func (*Project) CreateCommonMountPath

func (p *Project) CreateCommonMountPath() error

CreateCommonMountPath creates the CommonMountPath on the LXD host

func (*Project) CreateInstanceMountPath

func (p *Project) CreateInstanceMountPath(instanceName string) error

func (*Project) CreateMountPath

func (p *Project) CreateMountPath() error

func (*Project) InstanceMountPath

func (p *Project) InstanceMountPath(instanceName string) string

func (*Project) MountPath

func (p *Project) MountPath() string

type RemoteResource

type RemoteResource struct {
	Remote string
	Server lxd.InstanceServer
	Name   string
}

Jump to

Keyboard shortcuts

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