handlers

package
v0.0.0-...-e9fa201 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2026 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

Package handlers provides task handlers for the task queue.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FederationDiscoveryHandler

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

FederationDiscoveryHandler handles federation discovery tasks. It lists objects in external S3 and creates ingest tasks for them.

func NewFederationDiscoveryHandler

func NewFederationDiscoveryHandler(database db.DB, clientPool *federation.ClientPool, taskQueue taskqueue.Queue) *FederationDiscoveryHandler

NewFederationDiscoveryHandler creates a new federation discovery handler.

func (*FederationDiscoveryHandler) Handle

Handle processes a federation discovery task.

func (*FederationDiscoveryHandler) Type

Type returns the task type this handler processes.

type FederationIngestHandler

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

FederationIngestHandler handles federation ingest tasks. It fetches objects from external S3 and stores them in local storage.

func NewFederationIngestHandler

func NewFederationIngestHandler(database db.DB, clientPool *federation.ClientPool, objectWriter ObjectWriter) *FederationIngestHandler

NewFederationIngestHandler creates a new federation ingest handler.

func (*FederationIngestHandler) Handle

Handle processes a federation ingest task.

func (*FederationIngestHandler) Type

Type returns the task type this handler processes.

type LifecycleHandler

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

LifecycleHandler handles lifecycle task execution

func NewLifecycleHandler

func NewLifecycleHandler(database db.DB, fileClient client.File) *LifecycleHandler

NewLifecycleHandler creates a new lifecycle handler

func (*LifecycleHandler) Handle

func (h *LifecycleHandler) Handle(ctx context.Context, task *taskqueue.Task) error

Handle processes a lifecycle task

func (*LifecycleHandler) SetTransitionDeps

func (h *LifecycleHandler) SetTransitionDeps(deps *enterpriseLifecycle.TransitionDeps)

SetTransitionDeps sets the transition dependencies for enterprise transitions. If not set, transitions will log a warning and be skipped.

func (*LifecycleHandler) Type

Type returns the task type this handler processes

type ObjectWriter

type ObjectWriter interface {
	// WriteObject writes object data to local storage and returns chunk references.
	WriteObject(ctx context.Context, bucket, key string, body io.Reader, size int64, contentType string) (*types.ObjectRef, error)
}

ObjectWriter handles writing object data to local storage. This abstracts the storage coordinator for the federation handler.

Jump to

Keyboard shortcuts

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