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

package fake

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

Index

Package Files

fake.go

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) 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) and is imported by 1 packages. Updated 2019-09-12. Refresh now. Tools for package owners.