clusters

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2022 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRouter

func NewRouter(clustersClient Client) chi.Router

NewRouter return a new router with all the cluster routes.

Types

type Client added in v0.8.0

type Client interface {
	GetClusters() []cluster.Client
	GetCluster(name string) cluster.Client
}

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

func NewClient added in v0.8.0

func NewClient(config Config) (Client, error)

NewClient loads all clusters for the given configuration. The clusters can be retrieved from different providers. Currently we are supporting incluster configuration and kubeconfig files. In the future it is planning 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 added in v0.8.0

type MockClient struct {
	mock.Mock
}

MockClient is an autogenerated mock type for the Client type

func (*MockClient) GetCluster added in v0.8.0

func (_m *MockClient) GetCluster(name string) cluster.Client

GetCluster provides a mock function with given fields: name

func (*MockClient) GetClusters added in v0.8.0

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

GetClusters provides a mock function with given fields:

type Router

type Router struct {
	*chi.Mux
	// contains filtered or unexported fields
}

Router implements the router for the clusters package. The router provides all standard methods to interact with the Kubernetes API of a cluster.

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