common

package
v0.0.0-...-e7c744b Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2023 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientFactory

type ClientFactory interface {
	// FromSecret creates a Kubernetes client for a cluster from a secret.
	FromSecret(ctx context.Context, secretID string) (kubernetes.Interface, error)
}

ClientFactory returns a Kubernetes client.

type ClusterGetter

type ClusterGetter interface {
	GetClusterFromRequest(c *gin.Context) (cluster.CommonCluster, bool)
}

func NewClusterGetter

func NewClusterGetter(
	manager *cluster.Manager,
	logger logrus.FieldLogger,
	errorHandler emperror.Handler,
) ClusterGetter

NewClusterGetter returns a new ClusterGetter instance which returns a cluster from an API request.

type ConfigFactory

type ConfigFactory interface {
	// FromSecret returns a config from a secret.
	FromSecret(ctx context.Context, secretID string) (*rest.Config, error)
}

ConfigFactory returns a Kubernetes configuration.

type DynamicClientFactory

type DynamicClientFactory interface {
	// FromSecret creates a dynamic Kubernetes client for a cluster from a secret.
	FromSecret(ctx context.Context, secretID string) (dynamic.Interface, error)
}

DynamicClientFactory returns a dynamic Kubernetes client.

Jump to

Keyboard shortcuts

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