go: cloud.google.com/go/container Index | Files

package container

import "cloud.google.com/go/container"

Package container contains a deprecated Google Container Engine client.

Deprecated: Use google.golang.org/api/container instead.

Index

Package Files

container.go

Constants

const (
    TypeCreate = Type("createCluster")
    TypeDelete = Type("deleteCluster")
)
const (
    StatusDone         = Status("done")
    StatusPending      = Status("pending")
    StatusRunning      = Status("running")
    StatusError        = Status("error")
    StatusProvisioning = Status("provisioning")
    StatusStopping     = Status("stopping")
)

type Client Uses

type Client struct {
    // contains filtered or unexported fields
}

Client is a Google Container Engine client, which may be used to manage clusters with a project. It must be constructed via NewClient.

func NewClient Uses

func NewClient(ctx context.Context, projectID string, opts ...option.ClientOption) (*Client, error)

NewClient creates a new Google Container Engine client.

func (*Client) Cluster Uses

func (c *Client) Cluster(ctx context.Context, zone, name string) (*Resource, error)

Cluster returns metadata about the specified cluster.

func (*Client) Clusters Uses

func (c *Client) Clusters(ctx context.Context, zone string) ([]*Resource, error)

Clusters returns a list of cluster resources from the specified zone. If no zone is specified, it returns all clusters under the user project.

func (*Client) CreateCluster Uses

func (c *Client) CreateCluster(ctx context.Context, zone string, resource *Resource) (*Resource, error)

CreateCluster creates a new cluster with the provided metadata in the specified zone.

func (*Client) DeleteCluster Uses

func (c *Client) DeleteCluster(ctx context.Context, zone, name string) error

DeleteCluster deletes a cluster.

func (*Client) Operation Uses

func (c *Client) Operation(ctx context.Context, zone, name string) (*Op, error)

Operation returns an operation.

func (*Client) Operations Uses

func (c *Client) Operations(ctx context.Context, zone string) ([]*Op, error)

Operations returns a list of operations from the specified zone. If no zone is specified, it looks up for all of the operations that are running under the user's project.

type Op Uses

type Op struct {
    // Name is the name of the operation.
    Name string

    // Zone is the Google Compute Engine zone.
    Zone string

    // This field is ignored. It was removed from the underlying container API in v1.
    TargetURL string

    // Type is the operation type. It could be either be TypeCreate or TypeDelete.
    Type Type

    // Status is the current status of this operation. It could be either
    // OpDone or OpPending.
    Status Status
}

Op represents a Google Container Engine API operation.

type Resource Uses

type Resource struct {
    // Name is the name of this cluster. The name must be unique
    // within this project and zone, and can be up to 40 characters.
    Name string

    // Description is the description of the cluster. Optional.
    Description string

    // Zone is the Google Compute Engine zone in which the cluster resides.
    Zone string

    // Status is the current status of the cluster. It could either be
    // StatusError, StatusProvisioning, StatusRunning or StatusStopping.
    Status Status

    // Num is the number of the nodes in this cluster resource.
    Num int64

    // APIVersion is the version of the Kubernetes master and kubelets running
    // in this cluster. Allowed value is 0.4.2, or leave blank to
    // pick up the latest stable release.
    APIVersion string

    // Endpoint is the IP address of this cluster's Kubernetes master.
    // The endpoint can be accessed at https://username:password@endpoint/.
    // See Username and Password fields for the username and password information.
    Endpoint string

    // Username is the username to use when accessing the Kubernetes master endpoint.
    Username string

    // Password is the password to use when accessing the Kubernetes master endpoint.
    Password string

    // ContainerIPv4CIDR is the IP addresses of the container pods in
    // this cluster, in CIDR notation (e.g. 1.2.3.4/29).
    ContainerIPv4CIDR string

    // ServicesIPv4CIDR is the IP addresses of the Kubernetes services in this
    // cluster, in CIDR notation (e.g. 1.2.3.4/29). Service addresses are
    // always in the 10.0.0.0/16 range.
    ServicesIPv4CIDR string

    // MachineType is a Google Compute Engine machine type (e.g. n1-standard-1).
    // If none set, the default type is used while creating a new cluster.
    MachineType string

    // This field is ignored. It was removed from the underlying container API in v1.
    SourceImage string

    // Created is the creation time of this cluster.
    Created time.Time
}

Resource is a Google Container Engine cluster resource.

type Status Uses

type Status string

type Type Uses

type Type string

Package container imports 7 packages (graph). Updated 2017-11-17. Refresh now. Tools for package owners.