istio: istio.io/istio/pkg/bootstrap/platform Index | Files

package platform

import "istio.io/istio/pkg/bootstrap/platform"

Index

Package Files

aws.go gcp.go platform.go

Constants

const (
    AWSRegion           = "aws_region"
    AWSAvailabilityZone = "aws_availability_zone"
    AWSInstanceID       = "aws_instance_id"
    AWSAccountID        = "aws_account_id"
)
const (
    GCPProject    = "gcp_project"
    GCPCluster    = "gcp_gke_cluster_name"
    GCPLocation   = "gcp_location"
    GCEInstanceID = "gcp_gce_instance_id"
)

func IsAWS Uses

func IsAWS() bool

IsAWS returns whether or not the platform for bootstrapping is Amazon Web Services.

func IsGCP Uses

func IsGCP() bool

IsGCP returns whether or not the platform for bootstrapping is Google Cloud Platform.

type Environment Uses

type Environment interface {
    // Metadata returns a collection of environmental metadata, structured
    // as a map for metadata names to values. An example for GCP would be a
    // mapping from "gcp_project" to "2344534543". Keys should be prefixed
    // by the short name for the platform (example: "gcp_").
    Metadata() map[string]string

    // Locality returns the run location for the bootstrap transformed from the
    // platform-specific representation into the Envoy Locality schema.
    Locality() *core.Locality
}

Environment provides information for the platform on which the bootstrapping is taking place.

func NewAWS Uses

func NewAWS() Environment

NewAWS returns a platform environment customized for AWS. Metadata returned by the AWS Environment is taken from the EC2 metadata service.

func NewGCP Uses

func NewGCP() Environment

NewGCP returns a platform environment customized for Google Cloud Platform. Metadata returned by the GCP Environment is taken from the GCE metadata service.

type Unknown Uses

type Unknown struct{}

Unknown provides a default platform environment for cases in which the platform on which the bootstrapping is taking place cannot be determined.

func (*Unknown) Locality Uses

func (*Unknown) Locality() *core.Locality

Locality returns an empty core.Locality struct.

func (*Unknown) Metadata Uses

func (*Unknown) Metadata() map[string]string

Metadata returns an empty map.

Package platform imports 7 packages (graph) and is imported by 2 packages. Updated 2019-12-11. Refresh now. Tools for package owners.