kubernetes

package
v1.8.1 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2024 License: AGPL-3.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KubernetesProvider

type KubernetesProvider struct {
	Client kubernetes.Interface
	// contains filtered or unexported fields
}

func NewKubernetesProvider

func NewKubernetesProvider(providerConfig providerConfig.Kubernetes) (*KubernetesProvider, error)

func (*KubernetesProvider) GetGroups

func (provider *KubernetesProvider) GetGroups(ctx context.Context) (map[string][]string, error)

func (*KubernetesProvider) GetState

func (provider *KubernetesProvider) GetState(ctx context.Context, name string) (instance.State, error)

func (*KubernetesProvider) InstanceList

func (provider *KubernetesProvider) InstanceList(ctx context.Context, options providers.InstanceListOptions) ([]types.Instance, error)

func (*KubernetesProvider) NotifyInstanceStopped

func (provider *KubernetesProvider) NotifyInstanceStopped(ctx context.Context, instance chan<- string)

func (*KubernetesProvider) Start

func (provider *KubernetesProvider) Start(ctx context.Context, name string) error

func (*KubernetesProvider) Stop

func (provider *KubernetesProvider) Stop(ctx context.Context, name string) error

type ParseOptions

type ParseOptions struct {
	Delimiter string
}

type ParsedName

type ParsedName struct {
	Original  string
	Kind      string // deployment or statefulset
	Namespace string
	Name      string
	Replicas  int32
}

func DeploymentName

func DeploymentName(deployment v1.Deployment, opts ParseOptions) ParsedName

func ParseName

func ParseName(name string, opts ParseOptions) (ParsedName, error)

func StatefulSetName

func StatefulSetName(statefulSet v1.StatefulSet, opts ParseOptions) ParsedName

type Workload

type Workload interface {
	GetScale(ctx context.Context, workloadName string, options metav1.GetOptions) (*autoscalingv1.Scale, error)
	UpdateScale(ctx context.Context, workloadName string, scale *autoscalingv1.Scale, opts metav1.UpdateOptions) (*autoscalingv1.Scale, error)
}

Jump to

Keyboard shortcuts

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