task

package
v0.0.0-...-db62745 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2022 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 Deleter

type Deleter interface {
	Delete(ctx context.Context, guid string) (string, error)
}

type JobsClient

type JobsClient interface {
	GetByGUID(ctx context.Context, guid string, includeCompleted bool) ([]batchv1.Job, error)
	SetLabel(ctx context.Context, job *batchv1.Job, key, value string) (*batchv1.Job, error)
}

type PodsClient

type PodsClient interface {
	SetAnnotation(ctx context.Context, pod *corev1.Pod, key, value string) (*corev1.Pod, error)
	SetAndTestAnnotation(ctx context.Context, pod *corev1.Pod, key, value string, oldValue *string) (*corev1.Pod, error)
}

type Reconciler

type Reconciler struct {
	// contains filtered or unexported fields
}

func NewReconciler

func NewReconciler(
	logger lager.Logger,
	podClient client.Client,
	jobsClient JobsClient,
	podUpdater PodsClient,
	reporter Reporter,
	deleter Deleter,
	callbackRetryLimit int,
	ttlSeconds int,
) *Reconciler

func (Reconciler) Reconcile

func (r Reconciler) Reconcile(ctx context.Context, request reconcile.Request) (reconcile.Result, error)

type Reporter

type Reporter interface {
	Report(context.Context, *corev1.Pod) error
}

type StateReporter

type StateReporter struct {
	Client *http.Client
	Logger lager.Logger
}

func (StateReporter) Report

func (r StateReporter) Report(ctx context.Context, pod *corev1.Pod) error

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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