Documentation ¶
Index ¶
- Constants
- type Hcloud
- func (h *Hcloud) Configuration(ctx context.Context, r state.State) ([]byte, error)
- func (h *Hcloud) KernelArgs() procfs.Parameters
- func (h *Hcloud) Mode() runtime.Mode
- func (h *Hcloud) Name() string
- func (h *Hcloud) NetworkConfiguration(ctx context.Context, _ state.State, ch chan<- *runtime.PlatformNetworkConfig) error
- func (h *Hcloud) ParseMetadata(unmarshalledNetworkConfig *NetworkConfig, host, extIP []byte) (*runtime.PlatformNetworkConfig, error)
- type NetworkConfig
Constants ¶
View Source
const ( // HCloudExternalIPEndpoint is the local hcloud endpoint for the external IP. HCloudExternalIPEndpoint = "http://169.254.169.254/hetzner/v1/metadata/public-ipv4" // HCloudNetworkEndpoint is the local hcloud endpoint for the network-config. HCloudNetworkEndpoint = "http://169.254.169.254/hetzner/v1/metadata/network-config" // HCloudHostnameEndpoint is the local hcloud endpoint for the hostname. HCloudHostnameEndpoint = "http://169.254.169.254/hetzner/v1/metadata/hostname" // HCloudUserDataEndpoint is the local hcloud endpoint for the config. HCloudUserDataEndpoint = "http://169.254.169.254/hetzner/v1/userdata" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Hcloud ¶
type Hcloud struct{}
Hcloud is the concrete type that implements the runtime.Platform interface.
func (*Hcloud) Configuration ¶
Configuration implements the runtime.Platform interface.
func (*Hcloud) KernelArgs ¶
func (h *Hcloud) KernelArgs() procfs.Parameters
KernelArgs implements the runtime.Platform interface.
func (*Hcloud) NetworkConfiguration ¶ added in v1.0.0
func (h *Hcloud) NetworkConfiguration(ctx context.Context, _ state.State, ch chan<- *runtime.PlatformNetworkConfig) error
NetworkConfiguration implements the runtime.Platform interface.
func (*Hcloud) ParseMetadata ¶ added in v1.0.0
func (h *Hcloud) ParseMetadata(unmarshalledNetworkConfig *NetworkConfig, host, extIP []byte) (*runtime.PlatformNetworkConfig, error)
ParseMetadata converts HCloud metadata to platform network configuration.
type NetworkConfig ¶
type NetworkConfig struct { Version int `yaml:"version"` Config []struct { Mac string `yaml:"mac_address"` Interfaces string `yaml:"name"` Subnets []struct { NameServers []string `yaml:"dns_nameservers,omitempty"` Address string `yaml:"address,omitempty"` Gateway string `yaml:"gateway,omitempty"` Ipv4 bool `yaml:"ipv4,omitempty"` Ipv6 bool `yaml:"ipv6,omitempty"` Type string `yaml:"type"` } `yaml:"subnets"` Type string `yaml:"type"` } `yaml:"config"` }
NetworkConfig holds hcloud network-config info.
Click to show internal directories.
Click to hide internal directories.