clusters

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2022 License: MIT Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	GetClusters(ctx context.Context) []cluster.Client
	GetCluster(ctx context.Context, name string) cluster.Client
}

Client is the interface with all the methods to interact with all loaded Kubernetes clusters.

func NewClient

func NewClient(config Config) (Client, error)

NewClient returns a clusters client, which can then be used to interact with the Kubernetes API of all the configured clusters.

The clusters can be retrieved from different providers. Currently we are supporting incluster configuration and kubeconfig files. In the future it is planned to directly support GKE, EKS, AKS, etc.

type Config

type Config struct {
	Providers []provider.Config `json:"providers"`
}

Config is the configuration required to load all clusters. It takes an array of providers, which are defined in the providers package.

type MockClient

type MockClient struct {
	mock.Mock
}

MockClient is an autogenerated mock type for the Client type

func NewMockClient

func NewMockClient(t NewMockClientT) *MockClient

NewMockClient creates a new instance of MockClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*MockClient) GetCluster

func (_m *MockClient) GetCluster(ctx context.Context, name string) cluster.Client

GetCluster provides a mock function with given fields: ctx, name

func (*MockClient) GetClusters

func (_m *MockClient) GetClusters(ctx context.Context) []cluster.Client

GetClusters provides a mock function with given fields: ctx

type NewMockClientT

type NewMockClientT interface {
	mock.TestingT
	Cleanup(func())
}

Directories

Path Synopsis
terminal
Package terminal implements the functions for all terminal interactions in the frontend.
Package terminal implements the functions for all terminal interactions in the frontend.

Jump to

Keyboard shortcuts

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