jx: github.com/jenkins-x/jx/pkg/cluster/fake Index | Files

package fake

import "github.com/jenkins-x/jx/pkg/cluster/fake"


Package Files


type Client Uses

type Client struct {
    Clusters []*cluster.Cluster

Client a fake implementation of the cluster client

func NewClient Uses

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

NewClient create a new fake client for testing

func (*Client) Connect Uses

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

Connect connects to a cluster

func (*Client) Delete Uses

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

Delete should delete the cluster from the clusters list

func (*Client) Get Uses

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

Get looks up a cluster by name

func (*Client) List Uses

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

List lists the clusters

func (*Client) ListFilter Uses

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

ListFilter lists the clusters with a filter

func (*Client) SetClusterLabels Uses

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

SetClusterLabels labels the given cluster

func (*Client) String Uses

func (c *Client) String() string

String return the string representation

Package fake imports 3 packages (graph). Updated 2020-06-01. Refresh now. Tools for package owners.