fake

package
v2.1.102 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	Clusters []*cluster.Cluster
}

Client a fake implementation of the cluster client

func NewClient

func NewClient(clusters []*cluster.Cluster) *Client

NewClient create a new fake client for testing

func (*Client) Connect

func (c *Client) Connect(cluster *cluster.Cluster) error

Connect connects to a cluster

func (*Client) Delete

func (c *Client) Delete(cluster *cluster.Cluster) error

Delete should delete the cluster from the clusters list

func (*Client) Get

func (c *Client) Get(name string) (*cluster.Cluster, error)

Get looks up a cluster by name

func (*Client) List

func (c *Client) List() ([]*cluster.Cluster, error)

List lists the clusters

func (*Client) ListFilter

func (c *Client) ListFilter(labels map[string]string) ([]*cluster.Cluster, error)

ListFilter lists the clusters with a filter

func (*Client) SetClusterLabels

func (c *Client) SetClusterLabels(cluster *cluster.Cluster, labels map[string]string) error

SetClusterLabels labels the given cluster

func (*Client) String

func (c *Client) String() string

String return the string representation

Jump to

Keyboard shortcuts

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