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 ¶
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 ¶
Config is the configuration required to load all clusters. It takes an array of providers, which are defined in the providers package.
type MockClient ¶
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 ¶
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