providers

package
v1.1.0-beta.4 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2022 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const Delimiter = "_"

Delimiter is used to split name into kind,namespace,name,replicacount

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	OriginalName string
	Kind         string // deployment or statefulset
	Namespace    string
	Name         string
	Replicas     int32
}

type DockerClassicProvider

type DockerClassicProvider struct {
	Client client.APIClient
	// contains filtered or unexported fields
}

func NewDockerClassicProvider

func NewDockerClassicProvider() (*DockerClassicProvider, error)

func (*DockerClassicProvider) GetState

func (provider *DockerClassicProvider) GetState(name string) (instance.State, error)

func (*DockerClassicProvider) NotifyInsanceStopped

func (provider *DockerClassicProvider) NotifyInsanceStopped(ctx context.Context, instance chan<- string)

func (*DockerClassicProvider) Start

func (provider *DockerClassicProvider) Start(name string) (instance.State, error)

func (*DockerClassicProvider) Stop

func (provider *DockerClassicProvider) Stop(name string) (instance.State, error)

type DockerSwarmProvider

type DockerSwarmProvider struct {
	Client client.APIClient
	// contains filtered or unexported fields
}

func NewDockerSwarmProvider

func NewDockerSwarmProvider() (*DockerSwarmProvider, error)

func (*DockerSwarmProvider) GetState

func (provider *DockerSwarmProvider) GetState(name string) (instance.State, error)

func (*DockerSwarmProvider) NotifyInsanceStopped

func (provider *DockerSwarmProvider) NotifyInsanceStopped(ctx context.Context, instance chan<- string)

func (*DockerSwarmProvider) Start

func (provider *DockerSwarmProvider) Start(name string) (instance.State, error)

func (*DockerSwarmProvider) Stop

func (provider *DockerSwarmProvider) Stop(name string) (instance.State, error)

type KubernetesProvider

type KubernetesProvider struct {
	Client kubernetes.Interface
}

func NewKubernetesProvider

func NewKubernetesProvider() (*KubernetesProvider, error)

func (*KubernetesProvider) GetState

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

func (*KubernetesProvider) NotifyInsanceStopped

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

func (*KubernetesProvider) Start

func (provider *KubernetesProvider) Start(name string) (instance.State, error)

func (*KubernetesProvider) Stop

func (provider *KubernetesProvider) Stop(name string) (instance.State, error)

type Provider

type Provider interface {
	Start(name string) (instance.State, error)
	Stop(name string) (instance.State, error)
	GetState(name string) (instance.State, error)

	NotifyInsanceStopped(ctx context.Context, instance chan<- string)
}

func NewProvider

func NewProvider(config config.Provider) (Provider, error)

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)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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