Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsLoopback ¶ added in v0.59.3
IsLoopback returns true if iface contains only loopback addresses. Is it possible that a interface contains mixed IPs both loopback address and else?
Types ¶
type AzureVMGenerator ¶ added in v0.44.0
type AzureVMGenerator struct {
// contains filtered or unexported fields
}
AzureVMGenerator meta generator for Azure VM
func (*AzureVMGenerator) Generate ¶ added in v0.44.0
func (g *AzureVMGenerator) Generate() (interface{}, error)
Generate collects metadata from cloud platform.
func (*AzureVMGenerator) SuggestCustomIdentifier ¶ added in v0.44.0
func (g *AzureVMGenerator) SuggestCustomIdentifier() (string, error)
SuggestCustomIdentifier suggests the identifier of the Azure VM instance
type CloudGenerator ¶ added in v0.18.1
type CloudGenerator struct {
CloudMetaGenerator
}
CloudGenerator definition
func SuggestCloudGenerator ¶ added in v0.18.1
func SuggestCloudGenerator(conf *config.Config) *CloudGenerator
SuggestCloudGenerator returns suitable CloudGenerator
type CloudMetaGenerator ¶ added in v0.18.1
type CloudMetaGenerator interface {
Generate() (interface{}, error)
SuggestCustomIdentifier() (string, error)
}
CloudMetaGenerator interface of metadata generator for each cloud platform
type EC2Generator ¶ added in v0.18.1
type EC2Generator struct {
// contains filtered or unexported fields
}
EC2Generator meta generator for EC2
func (*EC2Generator) Generate ¶ added in v0.18.1
func (g *EC2Generator) Generate() (interface{}, error)
Generate collects metadata from cloud platform.
func (*EC2Generator) SuggestCustomIdentifier ¶ added in v0.33.0
func (g *EC2Generator) SuggestCustomIdentifier() (string, error)
SuggestCustomIdentifier suggests the identifier of the EC2 instance
type FilesystemGenerator ¶
type FilesystemGenerator struct {
}
FilesystemGenerator generates filesystem spec.
func (*FilesystemGenerator) Generate ¶
func (g *FilesystemGenerator) Generate() (interface{}, error)
Generate specs of filesystems.
type GCEGenerator ¶ added in v0.19.0
type GCEGenerator struct {
// contains filtered or unexported fields
}
GCEGenerator generate for GCE
func (*GCEGenerator) Generate ¶ added in v0.19.0
func (g *GCEGenerator) Generate() (interface{}, error)
Generate collects metadata from cloud platform.
func (*GCEGenerator) SuggestCustomIdentifier ¶ added in v0.33.0
func (g *GCEGenerator) SuggestCustomIdentifier() (string, error)
SuggestCustomIdentifier for GCE is not implemented yet
type Generator ¶
type Generator interface {
Generate() (interface{}, error)
}
Generator interface for generating spec values
type InterfaceGenerator ¶
InterfaceGenerator retrieve network informations
type Interfaces ¶ added in v0.59.3
Interfaces are map of network interfaces per name
func (Interfaces) AppendIPv4Address ¶ added in v0.59.3
func (ifs Interfaces) AppendIPv4Address(name, addr string)
AppendIPv4Address appends ipv4address
func (Interfaces) AppendIPv6Address ¶ added in v0.59.3
func (ifs Interfaces) AppendIPv6Address(name, addr string)
AppendIPv6Address appends ipv6address
func (Interfaces) SetMacAddress ¶ added in v0.59.3
func (ifs Interfaces) SetMacAddress(name, addr string)
SetMacAddress sets the macaddress