context

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2019 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package context contains the internal cluster context shared by various packages that implement the user face pkg/cluster.Context

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Context

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

Context is the private shared context underlying pkg/cluster.Context

NOTE: this is the internal one, it should contain reasonably trivial methods that are safe to share between various user facing methods pkg/cluster.Context is a superset of this, packages like create and delete consume this

func NewContext

func NewContext(name string) *Context

NewContext returns a new internal cluster management context if name is "" the default name will be used

func (*Context) ClusterLabel

func (c *Context) ClusterLabel() string

ClusterLabel returns the docker object label that will be applied to cluster "node" containers

func (*Context) KubeConfigPath

func (c *Context) KubeConfigPath() string

KubeConfigPath returns the path to where the Kubeconfig would be placed by kind based on the configuration.

func (*Context) ListNodes

func (c *Context) ListNodes() ([]nodes.Node, error)

ListNodes returns the list of container IDs for the "nodes" in the cluster

func (*Context) Name

func (c *Context) Name() string

Name returns the cluster's name

func (*Context) Validate

func (c *Context) Validate() error

Validate will be called before creating new resources using the context It will not be called before deleting or listing resources, so as to allow contexts based around previously valid values to be used in newer versions You can call this early yourself to check validation before creation calls, though it will be called internally.

Jump to

Keyboard shortcuts

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