clients

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2018 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Kube

type Kube interface {
	GetDeployment(ctx context.Context, nsID, deployName string) (*kubtypes.Deployment, error)
	CreateDeployment(ctx context.Context, nsID string, deploy kubtypes.Deployment) error
	UpdateDeployment(ctx context.Context, nsID string, deploy kubtypes.Deployment) error
	SetDeploymentReplicas(ctx context.Context, nsID, deplName string, replicas int) error
	SetContainerImage(ctx context.Context, nsID, deplName string, container kubtypes.UpdateImage) error
	DeleteSolutionDeployments(ctx context.Context, nsID, solutionName string) error
	DeleteDeployment(ctx context.Context, nsID, deplName string) error

	CreateIngress(ctx context.Context, nsID string, ingress kubtypes.Ingress) error
	UpdateIngress(ctx context.Context, nsID string, ingress kubtypes.Ingress) error
	DeleteIngress(ctx context.Context, nsID, ingressName string) error

	CreateSecret(ctx context.Context, nsID string, secret kubtypes.Secret) error
	DeleteSecret(ctx context.Context, nsID, secretName string) error

	GetService(ctx context.Context, nsID, svcName string) (*kubtypes.Service, error)
	CreateService(ctx context.Context, nsID string, service kubtypes.Service) error
	UpdateService(ctx context.Context, nsID string, service kubtypes.Service) error
	DeleteService(ctx context.Context, nsID, serviceName string) error
	DeleteSolutionServices(ctx context.Context, nsID, solutionName string) error

	CreateConfigMap(ctx context.Context, nsID string, cm kubtypes.ConfigMap) error
	DeleteConfigMap(ctx context.Context, nsID, cmName string) error
}

Kube is an interface to kube-api service

func NewDummyKube

func NewDummyKube() Kube

NewDummyKube creates a dummy client to kube-api service. It does nothing but logs actions.

func NewKubeHTTP

func NewKubeHTTP(u *url.URL) Kube

NewKubeHTTP creates http client to kube-api service.

type Permissions

type Permissions interface {
	GetNamespaceLimits(ctx context.Context, namespaceID string) (kubtypes.Namespace, error)
}

func NewPermissionsHTTP

func NewPermissionsHTTP(permissionsHost string) Permissions

Jump to

Keyboard shortcuts

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