Documentation ¶
Index ¶
- type KubernetesProvider
- func (provider *KubernetesProvider) GetGroups(ctx context.Context) (map[string][]string, error)
- func (provider *KubernetesProvider) GetState(ctx context.Context, name string) (instance.State, error)
- func (provider *KubernetesProvider) InstanceList(ctx context.Context, options providers.InstanceListOptions) ([]types.Instance, error)
- func (provider *KubernetesProvider) NotifyInstanceStopped(ctx context.Context, instance chan<- string)
- func (provider *KubernetesProvider) Start(ctx context.Context, name string) error
- func (provider *KubernetesProvider) Stop(ctx context.Context, name string) error
- type ParseOptions
- type ParsedName
- type Workload
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) 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)
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) }
Click to show internal directories.
Click to hide internal directories.