job

package
v1.1.13 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2026 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromResource

func FromResource(job client.Object) (stream.BackendResource, error)

func NewBackfillRequestFilter

func NewBackfillRequestFilter(streamClass string) predicate.TypedPredicate[*v1.BackfillRequest]

func NewPredicate

func NewPredicate() predicate.TypedPredicate[*v1.Job]

Types

type Backend

type Backend struct {
	backend.BaseResourceManager
	backend.ResourceReader
	// contains filtered or unexported fields
}

func NewJobBackend

func NewJobBackend(client client.Client, jobBuilder stream.JobBuilder, eventRecorder record.EventRecorder, phaseManager stream.StatusManager) *Backend

func (*Backend) Apply

func (j *Backend) Apply(ctx context.Context, definition stream.Definition, backfillRequest *v1.BackfillRequest, nextPhase stream.Phase, streamClass *v1.StreamClass, eventFunc controllers.EventFunc) (reconcile.Result, error)

func (*Backend) Get

func (*Backend) NoOp

func (j *Backend) NoOp(ctx context.Context, definition stream.Definition, backfillRequest *v1.BackfillRequest, nextPhase stream.Phase, eventFunc controllers.EventFunc) (reconcile.Result, error)

func (*Backend) Remove

func (j *Backend) Remove(ctx context.Context, definition stream.Definition, nextPhase stream.Phase, eventFunc controllers.EventFunc) (reconcile.Result, error)

func (*Backend) SetupWithController

func (j *Backend) SetupWithController(cache cache.Cache, scheme *runtime.Scheme, mapper meta.RESTMapper, controller controller.Controller, primaryGvk schema.GroupVersionKind) error

type BackendResource

type BackendResource struct {
	*v1.Job
}

func (*BackendResource) CurrentConfiguration

func (j *BackendResource) CurrentConfiguration() (string, error)

func (*BackendResource) IsBackfill

func (j *BackendResource) IsBackfill() bool

func (*BackendResource) IsCompleted

func (j *BackendResource) IsCompleted() bool

func (*BackendResource) IsFailed

func (j *BackendResource) IsFailed() bool

func (*BackendResource) Name

func (j *BackendResource) Name() string

func (*BackendResource) ToObject

func (j *BackendResource) ToObject() client.Object

func (*BackendResource) UID

func (j *BackendResource) UID() types.UID

type BackfillBackend

type BackfillBackend struct {
	backend.BaseResourceManager
	// contains filtered or unexported fields
}

func NewBackfillBackendResourceManager

func NewBackfillBackendResourceManager(class *v1.StreamClass, client client.Client, manager stream.StatusManager, eventRecorder record.EventRecorder) *BackfillBackend

func (*BackfillBackend) Apply

func (b *BackfillBackend) Apply(ctx context.Context, definition stream.Definition, backfillRequest *v1.BackfillRequest, nextPhase stream.Phase, _ *v1.StreamClass, eventFunc controllers.EventFunc) (reconcile.Result, error)

func (*BackfillBackend) Complete added in v1.1.8

func (b *BackfillBackend) Complete(ctx context.Context, definition stream.Definition, nextPhase stream.Phase, _ *v1.StreamClass, eventFunc controllers.EventFunc) (reconcile.Result, error)

Complete marks the backfill request as completed. It does not remove the backfill job. It is the responsibility of the caller to remove the backfill job if necessary.

func (*BackfillBackend) Get

func (*BackfillBackend) GetBackfillRequest

func (b *BackfillBackend) GetBackfillRequest(ctx context.Context, definition stream.Definition) (*v1.BackfillRequest, error)

func (*BackfillBackend) NoOp

func (b *BackfillBackend) NoOp(ctx context.Context, definition stream.Definition, backfillRequest *v1.BackfillRequest, nextPhase stream.Phase, eventFunc controllers.EventFunc) (reconcile.Result, error)

func (*BackfillBackend) Remove

func (b *BackfillBackend) Remove(ctx context.Context, definition stream.Definition, nextPhase stream.Phase, eventFunc controllers.EventFunc) (reconcile.Result, error)

Remove removes the backfill job. This method DOES NOT mark the backfill request as completed. It is the responsibility of the caller to mark the backfill request as completed if necessary.

func (*BackfillBackend) SetupWithController

func (b *BackfillBackend) SetupWithController(cache cache.Cache, _ *runtime.Scheme, _ meta.RESTMapper, controller controller.Controller, _ schema.GroupVersionKind) error

type BackfillRequestFilter

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

func (*BackfillRequestFilter) Create

Create filters BackfillRequests that are not completed and match the specified stream class.

func (*BackfillRequestFilter) Delete

Delete filters BackfillRequests that are not completed and match the specified stream class.

func (*BackfillRequestFilter) Generic

Generic always returns false to ignore generic events.

func (*BackfillRequestFilter) Update

Update always returns false to ignore update events.

type Predicate

type Predicate struct {
	backend.SecondaryResourcePredicate[*v1.Job]
}

Predicate is a predicate that allows job events to pass through to the Stream controller.

func (*Predicate) Update

func (j *Predicate) Update(e event.TypedUpdateEvent[*v1.Job]) bool

Update is called when an object is updated.

Jump to

Keyboard shortcuts

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