clientcfg

package
v0.0.4-rc3 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2018 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNoConfig = errors.New("no config found")

Functions

This section is empty.

Types

type Cluster

type Cluster struct {
	clientaccess.Info

	ID                   string  `json:"id,omitempty"`
	Checksum             string  `json:"-"`
	Name                 string  `json:"name,omitempty"`
	DefaultStackName     string  `json:"defaultStackName,omitempty"`
	DefaultWorkspaceName string  `json:"defaultWorkspaceName,omitempty"`
	Default              bool    `json:"default,omitempty"`
	Config               *Config `json:"-"`

	File string
	// contains filtered or unexported fields
}

func ListClusters

func ListClusters(dir string) ([]Cluster, error)

func (*Cluster) Client

func (c *Cluster) Client() (*spaceclient.Client, error)

func (*Cluster) CreateWorkspace

func (c *Cluster) CreateWorkspace(name string) (*Workspace, error)

func (*Cluster) Domain

func (c *Cluster) Domain() (string, error)

func (*Cluster) Kubectl

func (c *Cluster) Kubectl(namespace, command string, args ...string) error

func (*Cluster) KubectlCmd

func (c *Cluster) KubectlCmd(namespace, command string, args ...string) (*exec.Cmd, error)

func (*Cluster) Workspace

func (c *Cluster) Workspace() (*Workspace, error)

func (*Cluster) Workspaces

func (c *Cluster) Workspaces() ([]Workspace, error)

type Config

type Config struct {
	Home          string
	ClusterName   string
	WorkspaceName string
	Debug         bool
	Wait          bool
	WaitTimeout   int
	WaitState     string
	ServerURL     string
	Token         string
	// contains filtered or unexported fields
}

func (*Config) ClientDir

func (c *Config) ClientDir() string

func (*Config) Cluster

func (c *Config) Cluster() (*Cluster, error)

func (*Config) ClusterClient

func (c *Config) ClusterClient() (*spaceclient.Client, error)

func (*Config) ClusterDir

func (c *Config) ClusterDir() string

func (*Config) Clusters

func (c *Config) Clusters() ([]Cluster, error)

func (*Config) DefaultClusterName

func (c *Config) DefaultClusterName() (string, error)

func (*Config) KubeconfigCache

func (c *Config) KubeconfigCache() string

func (*Config) SaveCluster

func (c *Config) SaveCluster(cluster *Cluster, validate bool) error

func (*Config) Validate

func (c *Config) Validate() error

func (*Config) Workspace

func (c *Config) Workspace() (*Workspace, error)

func (*Config) WorkspaceClient

func (c *Config) WorkspaceClient() (*client.Client, error)

type Workspace

type Workspace struct {
	spaceclient.Space
	Cluster *Cluster
	Default bool
	// contains filtered or unexported fields
}

func (*Workspace) Client

func (w *Workspace) Client() (*client.Client, error)

Jump to

Keyboard shortcuts

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