lxd: github.com/lxc/lxd/lxd/instance/instancetype Index | Files

package instancetype

import "github.com/lxc/lxd/lxd/instance/instancetype"


Package Files

instance_type.go instance_vmagentmount.go


const (
    // Any represents any type of instance.
    Any = Type(-1)

    // Container represents a container instance type.
    Container = Type(0)

    // VM represents a virtual-machine instance type.
    VM  = Type(1)

type Type Uses

type Type int

Type indicates the type of instance.

func New Uses

func New(name string) (Type, error)

New validates the supplied string against the allowed types of instance and returns the internal representation of that type. If empty string is supplied then the type returned is TypeContainer. If an invalid name is supplied an error will be returned.

func (Type) String Uses

func (instanceType Type) String() string

String converts the internal representation of instance type to a string used in API requests. Returns empty string if value is not a valid instance type.

type VMAgentMount Uses

type VMAgentMount struct {
    Source  string   `json:"source"`
    Target  string   `json:"target"`
    FSType  string   `json:"fstype"`
    Options []string `json:"options"`

VMAgentMount defines mounts to perform inside VM via agent.

Package instancetype imports 2 packages (graph) and is imported by 28 packages. Updated 2020-03-06. Refresh now. Tools for package owners.