Documentation ¶
Overview ¶
Package gcp contains the GCP implementation of the [platform.Platform].
Index ¶
- type GCP
- func (g *GCP) Configuration(ctx context.Context, r state.State) ([]byte, error)
- func (g *GCP) KernelArgs(string) procfs.Parameters
- func (g *GCP) Mode() runtime.Mode
- func (g *GCP) Name() string
- func (g *GCP) NetworkConfiguration(ctx context.Context, st state.State, ch chan<- *runtime.PlatformNetworkConfig) error
- func (g *GCP) ParseMetadata(metadata *MetadataConfig, interfaces []NetworkInterfaceConfig) (*runtime.PlatformNetworkConfig, error)
- type MetadataConfig
- type NetworkInterfaceConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GCP ¶
type GCP struct{}
GCP is the concrete type that implements the platform.Platform interface.
func (*GCP) Configuration ¶
Configuration implements the platform.Platform interface.
func (*GCP) KernelArgs ¶
func (g *GCP) KernelArgs(string) procfs.Parameters
KernelArgs implements the runtime.Platform interface.
func (*GCP) NetworkConfiguration ¶
func (g *GCP) NetworkConfiguration(ctx context.Context, st state.State, ch chan<- *runtime.PlatformNetworkConfig) error
NetworkConfiguration implements the runtime.Platform interface.
func (*GCP) ParseMetadata ¶
func (g *GCP) ParseMetadata(metadata *MetadataConfig, interfaces []NetworkInterfaceConfig) (*runtime.PlatformNetworkConfig, error)
ParseMetadata converts GCP platform metadata into platform network config.
type MetadataConfig ¶
type MetadataConfig struct { ProjectID string `json:"project-id"` Name string `json:"name,omitempty"` Hostname string `json:"hostname,omitempty"` Zone string `json:"zone,omitempty"` InstanceType string `json:"machine-type"` InstanceID string `json:"id"` Preempted string `json:"preempted"` }
MetadataConfig holds meta info.
type NetworkInterfaceConfig ¶ added in v1.4.0
type NetworkInterfaceConfig struct { AccessConfigs []struct { ExternalIP string `json:"externalIp,omitempty"` Type string `json:"type,omitempty"` } `json:"accessConfigs,omitempty"` GatewayIPv4 string `json:"gateway,omitempty"` GatewayIPv6 string `json:"gatewayIpv6,omitempty"` IPv4 string `json:"ip,omitempty"` IPv6 []string `json:"ipv6,omitempty"` MTU int `json:"mtu,omitempty"` }
NetworkInterfaceConfig holds network meta info.
Click to show internal directories.
Click to hide internal directories.