Documentation ¶
Index ¶
- func Collect(specGenerators []Generator) map[string]interface{}
- type AzureVMGenerator
- type CloudGenerator
- type CloudMetaGenerator
- type EC2Generator
- type FilesystemGenerator
- type GCEGenerator
- type Generator
- type InterfaceGenerator
- type NetInterface
- type NetInterfaces
- func (ifs NetInterfaces) AppendIPv4Address(name, addr string)
- func (ifs NetInterfaces) AppendIPv6Address(name, addr string)
- func (ifs NetInterfaces) SetAddress(name, addr string)
- func (ifs NetInterfaces) SetDefaultGateway(name, gateway string)
- func (ifs NetInterfaces) SetEncap(name, encap string)
- func (ifs NetInterfaces) SetMacAddress(name, addr string)
- func (ifs NetInterfaces) SetV6Address(name, addr string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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
func (*CloudGenerator) Key ¶ added in v0.18.1
func (g *CloudGenerator) Key() string
Key is a root key for the generator.
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 generator for filesystems implements spec.Generator interface
func (*FilesystemGenerator) Generate ¶
func (g *FilesystemGenerator) Generate() (interface{}, error)
Generate specs of filesystems
func (*FilesystemGenerator) Key ¶
func (g *FilesystemGenerator) Key() string
Key key name of the generator for satisfying spec.Generator interface
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 InterfaceGenerator ¶
type InterfaceGenerator interface { Key() string Generate() ([]NetInterface, error) }
InterfaceGenerator retrieve network informations
type NetInterface ¶ added in v0.30.0
type NetInterface struct { Name string `json:"name"` Encap string `json:"encap,omitempty"` IPv4Addresses []string `json:"ipv4Addresses"` IPv6Addresses []string `json:"ipv6Addresses"` Address string `json:"address,omitempty"` V6Address string `json:"v6address,omitempty"` MacAddress string `json:"macAddress,omitempty"` DefaultGateway string `json:"defaultGateway,omitempty"` }
NetInterface represents network interface informations
type NetInterfaces ¶ added in v0.30.0
type NetInterfaces map[string]NetInterface
NetInterfaces are map of network interfaces per name
func (NetInterfaces) AppendIPv4Address ¶ added in v0.30.0
func (ifs NetInterfaces) AppendIPv4Address(name, addr string)
AppendIPv4Address appends ipv4address
func (NetInterfaces) AppendIPv6Address ¶ added in v0.30.0
func (ifs NetInterfaces) AppendIPv6Address(name, addr string)
AppendIPv6Address appends ipv6address
func (NetInterfaces) SetAddress ¶ added in v0.30.0
func (ifs NetInterfaces) SetAddress(name, addr string)
SetAddress sets the address
func (NetInterfaces) SetDefaultGateway ¶ added in v0.30.0
func (ifs NetInterfaces) SetDefaultGateway(name, gateway string)
SetDefaultGateway sets the defaultGateway
func (NetInterfaces) SetEncap ¶ added in v0.30.0
func (ifs NetInterfaces) SetEncap(name, encap string)
SetEncap sets the encap
func (NetInterfaces) SetMacAddress ¶ added in v0.30.0
func (ifs NetInterfaces) SetMacAddress(name, addr string)
SetMacAddress sets the macaddress
func (NetInterfaces) SetV6Address ¶ added in v0.30.0
func (ifs NetInterfaces) SetV6Address(name, addr string)
SetV6Address sets the v6address