Documentation
¶
Overview ¶
nolint: dupl
nolint: dupl
Index ¶
Constants ¶
const ( // ProtocolUndefined is not a valid protocol ProtocolUndefined = Protocol(0) // ProtocolTCP makes the endpoint use TCP ProtocolTCP = Protocol(1) // ProtocolUDP makes the endpoint use UDP ProtocolUDP = Protocol(2) )
const (
BlockType = "unix-block"
)
const (
CharType = "unix-char"
)
const (
DiskType = "disk"
)
const (
NicType = "nic"
)
const (
NoneType = "none"
)
const (
ProxyType = "proxy"
)
Variables ¶
var ( ErrNotSupported = errors.New("not supported") ErrNotValid = errors.New("not valid") )
Functions ¶
This section is empty.
Types ¶
type Block ¶
Block device representation https://lxd.readthedocs.io/en/latest/containers/#type-unix-block
type Char ¶
Char device representation https://lxd.readthedocs.io/en/latest/containers/#type-unix-char
type Device ¶
type Device interface { // ToMap returns assigned name or if unset the type specific unique name and serializes the options into a lxd device map. The key name must be passed through trimKeyName function to guarantee length compatibility. ToMap() (name string, options map[string]string) // FromMap loads assigned name (can be empty) and options FromMap(name string, options map[string]string) error // contains filtered or unexported methods }
Device must support mapping from lxd device map bidirectional
type Disk ¶
type Disk struct { KeyName string Path string Source string Pool string Size string Readonly bool Optional bool }
Disk device representation https://lxd.readthedocs.io/en/latest/containers/#type-disk
type Nic ¶
Nic device representation https://lxd.readthedocs.io/en/latest/containers/#type-nic
type None ¶
type None struct {
KeyName string
}
None device representation https://lxd.readthedocs.io/en/latest/containers/#type-none
type Proxy ¶
type Proxy struct { KeyName string Listen *ProxyEndpoint Destination *ProxyEndpoint }
Proxy device representation https://lxd.readthedocs.io/en/latest/containers/#type-proxy
type ProxyEndpoint ¶
ProxyEndpoint defines an enpoint with protocol, address and port
func NewProxyEndpoint ¶
func NewProxyEndpoint(str string) (*ProxyEndpoint, error)
NewProxyEndpoint parses a string of the form protocol:address:port protocol: tcp|udp address: ip or empty port: uiint16 TODO verify and document allowed format values
func (*ProxyEndpoint) String ¶
func (p *ProxyEndpoint) String() string