Documentation
¶
Index ¶
- type ParseOptions
- type ParsedName
- type Provider
- func (p *Provider) DeploymentGroups(ctx context.Context) (map[string][]string, error)
- func (p *Provider) DeploymentInspect(ctx context.Context, config ParsedName) (sablier.InstanceInfo, error)
- func (p *Provider) DeploymentList(ctx context.Context) ([]sablier.InstanceConfiguration, error)
- func (p *Provider) InstanceGroups(ctx context.Context) (map[string][]string, error)
- func (p *Provider) InstanceInspect(ctx context.Context, name string) (sablier.InstanceInfo, error)
- func (p *Provider) InstanceList(ctx context.Context, options provider.InstanceListOptions) ([]sablier.InstanceConfiguration, error)
- func (p *Provider) InstanceStart(ctx context.Context, name string) error
- func (p *Provider) InstanceStop(ctx context.Context, name string) error
- func (p *Provider) NotifyInstanceStopped(ctx context.Context, instance chan<- string)
- func (p *Provider) StatefulSetGroups(ctx context.Context) (map[string][]string, error)
- func (p *Provider) StatefulSetInspect(ctx context.Context, config ParsedName) (sablier.InstanceInfo, error)
- func (p *Provider) StatefulSetList(ctx context.Context) ([]sablier.InstanceConfiguration, error)
- type Workload
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
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 Provider ¶ added in v1.9.0
type Provider struct {
Client kubernetes.Interface
// contains filtered or unexported fields
}
func New ¶ added in v1.9.0
func New(ctx context.Context, client *kubernetes.Clientset, logger *slog.Logger, config providerConfig.Kubernetes) (*Provider, error)
func (*Provider) DeploymentGroups ¶ added in v1.9.0
func (*Provider) DeploymentInspect ¶ added in v1.9.0
func (p *Provider) DeploymentInspect(ctx context.Context, config ParsedName) (sablier.InstanceInfo, error)
func (*Provider) DeploymentList ¶ added in v1.9.0
func (*Provider) InstanceGroups ¶ added in v1.9.0
func (*Provider) InstanceInspect ¶ added in v1.9.0
func (*Provider) InstanceList ¶ added in v1.9.0
func (p *Provider) InstanceList(ctx context.Context, options provider.InstanceListOptions) ([]sablier.InstanceConfiguration, error)
func (*Provider) InstanceStart ¶ added in v1.9.0
func (*Provider) InstanceStop ¶ added in v1.9.0
func (*Provider) NotifyInstanceStopped ¶ added in v1.9.0
func (*Provider) StatefulSetGroups ¶ added in v1.9.0
func (*Provider) StatefulSetInspect ¶ added in v1.9.0
func (p *Provider) StatefulSetInspect(ctx context.Context, config ParsedName) (sablier.InstanceInfo, error)
func (*Provider) StatefulSetList ¶ added in v1.9.0
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.