workload

package
v0.0.0-...-9b96d08 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2021 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GetOptions

type GetOptions struct {
	Client        k8s.Client
	Recorder      record.EventRecorder
	Log           logr.Logger
	DClient       k8s.DClient
	Scheme        *runtime.Scheme
	Labels        map[string]string
	Observers     *observer.Manager
	ZKClient      *zk.BaseClient
	ObservedState *observer.State
	Monitor       *prometheus.GenericClientset
	Finalizers    finalizer.Handler
	ExpectSts     *appsv1.StatefulSet
	ActualSts     *appsv1.StatefulSet
}

type Getter

type Getter interface {
	// For Provision
	ProvisionWorkload(ctx context.Context, workload *cachev1alpha1.Workload, options *GetOptions) Reconciler

	// For Scale
	ScaleWorkload(ctx context.Context, workload *cachev1alpha1.Workload, options *GetOptions) Reconciler

	// For Rollout
	RolloutWorkload(ctx context.Context, workload *cachev1alpha1.Workload, options *GetOptions) Reconciler
}

type GetterImpl

type GetterImpl struct {
}

func (*GetterImpl) ProvisionWorkload

func (impl *GetterImpl) ProvisionWorkload(ctx context.Context, workload *cachev1alpha1.Workload, options *GetOptions) Reconciler

func (*GetterImpl) RolloutWorkload

func (impl *GetterImpl) RolloutWorkload(ctx context.Context, workload *cachev1alpha1.Workload, options *GetOptions) Reconciler

func (*GetterImpl) ScaleWorkload

func (impl *GetterImpl) ScaleWorkload(ctx context.Context, workload *cachev1alpha1.Workload, options *GetOptions) Reconciler

type ReconcileWorkload

type ReconcileWorkload struct {
	Getter
	Workload      *cachev1alpha1.Workload
	CTX           context.Context
	Client        k8s.Client
	Recorder      record.EventRecorder
	Log           logr.Logger
	DClient       k8s.DClient
	Scheme        *runtime.Scheme
	Observers     *observer.Manager
	Monitor       *prometheus.GenericClientset
	Labels        map[string]string
	ZKClient      *zk.BaseClient
	ObservedState *observer.State
	Finalizers    finalizer.Handler
}

ReconcileWorkload implement the Reconciler interface and lcm.Controller interface.

func (*ReconcileWorkload) GetOptions

func (w *ReconcileWorkload) GetOptions() *GetOptions

func (*ReconcileWorkload) Reconcile

func (w *ReconcileWorkload) Reconcile() error

type Reconciler

type Reconciler interface {
	// Reconcile the dependent service.
	Reconcile() error
}

Directories

Path Synopsis
common
cm
sts
svc
zk

Jump to

Keyboard shortcuts

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