gcp

package
v1.3.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 24, 2023 License: MPL-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package gcp contains the GCP implementation of the [platform.Platform].

Index

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

func (g *GCP) Configuration(ctx context.Context, r state.State) ([]byte, error)

Configuration implements the platform.Platform interface.

func (*GCP) KernelArgs

func (g *GCP) KernelArgs() procfs.Parameters

KernelArgs implements the runtime.Platform interface.

func (*GCP) Mode

func (g *GCP) Mode() runtime.Mode

Mode implements the platform.Platform interface.

func (*GCP) Name

func (g *GCP) Name() string

Name implements the platform.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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL