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() 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) (*runtime.PlatformNetworkConfig, error)
- type MetadataConfig
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() 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) (*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"` PublicIPv4 string `json:"external-ip"` Preempted string `json:"preempted"` }
MetadataConfig holds meta info.
Click to show internal directories.
Click to hide internal directories.