Documentation
¶
Index ¶
- func FromResource(job client.Object) (stream.BackendResource, error)
- func NewBackfillRequestFilter(streamClass string) predicate.TypedPredicate[*v1.BackfillRequest]
- func NewPredicate() predicate.TypedPredicate[*v1.Job]
- type Backend
- func (j *Backend) Apply(ctx context.Context, definition stream.Definition, ...) (reconcile.Result, error)
- func (j *Backend) Get(ctx context.Context, name types.NamespacedName) (stream.BackendResource, error)
- func (j *Backend) NoOp(ctx context.Context, definition stream.Definition, ...) (reconcile.Result, error)
- func (j *Backend) Remove(ctx context.Context, definition stream.Definition, nextPhase stream.Phase, ...) (reconcile.Result, error)
- func (j *Backend) SetupWithController(cache cache.Cache, scheme *runtime.Scheme, mapper meta.RESTMapper, ...) error
- type BackendResource
- func (j *BackendResource) CurrentConfiguration() (string, error)
- func (j *BackendResource) IsBackfill() bool
- func (j *BackendResource) IsCompleted() bool
- func (j *BackendResource) IsFailed() bool
- func (j *BackendResource) Name() string
- func (j *BackendResource) ToObject() client.Object
- func (j *BackendResource) UID() types.UID
- type BackfillBackend
- func (b *BackfillBackend) Apply(ctx context.Context, definition stream.Definition, ...) (reconcile.Result, error)
- func (b *BackfillBackend) Complete(ctx context.Context, definition stream.Definition, nextPhase stream.Phase, ...) (reconcile.Result, error)
- func (b *BackfillBackend) Get(ctx context.Context, name types.NamespacedName) (stream.BackendResource, error)
- func (b *BackfillBackend) GetBackfillRequest(ctx context.Context, definition stream.Definition) (*v1.BackfillRequest, error)
- func (b *BackfillBackend) NoOp(ctx context.Context, definition stream.Definition, ...) (reconcile.Result, error)
- func (b *BackfillBackend) Remove(ctx context.Context, definition stream.Definition, nextPhase stream.Phase, ...) (reconcile.Result, error)
- func (b *BackfillBackend) SetupWithController(cache cache.Cache, _ *runtime.Scheme, _ meta.RESTMapper, ...) error
- type BackfillRequestFilter
- func (j *BackfillRequestFilter) Create(e event.TypedCreateEvent[*v1.BackfillRequest]) bool
- func (j *BackfillRequestFilter) Delete(e event.TypedDeleteEvent[*v1.BackfillRequest]) bool
- func (j *BackfillRequestFilter) Generic(_ event.TypedGenericEvent[*v1.BackfillRequest]) bool
- func (j *BackfillRequestFilter) Update(_ event.TypedUpdateEvent[*v1.BackfillRequest]) bool
- type Predicate
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 (j *Backend) Get(ctx context.Context, name types.NamespacedName) (stream.BackendResource, error)
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) SetupWithController ¶
func (j *Backend) SetupWithController(cache cache.Cache, scheme *runtime.Scheme, mapper meta.RESTMapper, controller controller.Controller, primaryGvk schema.GroupVersionKind) error
type BackendResource ¶
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 (b *BackfillBackend) Get(ctx context.Context, name types.NamespacedName) (stream.BackendResource, error)
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 ¶
func (j *BackfillRequestFilter) Create(e event.TypedCreateEvent[*v1.BackfillRequest]) bool
Create filters BackfillRequests that are not completed and match the specified stream class.
func (*BackfillRequestFilter) Delete ¶
func (j *BackfillRequestFilter) Delete(e event.TypedDeleteEvent[*v1.BackfillRequest]) bool
Delete filters BackfillRequests that are not completed and match the specified stream class.
func (*BackfillRequestFilter) Generic ¶
func (j *BackfillRequestFilter) Generic(_ event.TypedGenericEvent[*v1.BackfillRequest]) bool
Generic always returns false to ignore generic events.
func (*BackfillRequestFilter) Update ¶
func (j *BackfillRequestFilter) Update(_ event.TypedUpdateEvent[*v1.BackfillRequest]) bool
Update always returns false to ignore update events.