tasks

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2026 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrRunningTask = errors.New("task failed")

Functions

func NewKeystorePoolFiller

func NewKeystorePoolFiller(
	updater KeystorePoolFiller,
	repo repo.Repo,
	poolConfig config.KeystorePool,
) async.TaskHandler

func NewNotificationSender

func NewNotificationSender(
	client NotificationClient,
) async.TaskHandler

func NewPendingStateSync added in v0.10.0

func NewPendingStateSync(
	keyClient PendingStateUpdater,
	repo repo.Repo,
) async.TaskHandler

func NewWorkflowProcessor

func NewWorkflowProcessor(
	updater WorkflowUpdater,
	repo repo.Repo,
) async.TaskHandler

Types

type KeystorePoolFiller

type KeystorePoolFiller interface {
	FillKeystorePool(ctx context.Context, size int) error
}

type NotificationClient

type NotificationClient interface {
	CreateNotification(ctx context.Context, notif client.Data) error
}

type PendingStateSync added in v0.10.0

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

PendingStateSync is an on-demand per-key task that processes a single key in PENDING_CREATION or PENDING_REGISTRATION state. It drives provisioning or auth retry until success, or transitions the key to ERROR/FORBIDDEN on hard timeout.

func (*PendingStateSync) ProcessTask added in v0.10.0

func (h *PendingStateSync) ProcessTask(ctx context.Context, task *asynq.Task) error

func (*PendingStateSync) Role added in v0.10.0

func (*PendingStateSync) TaskType added in v0.10.0

func (h *PendingStateSync) TaskType() string

type PendingStateUpdater added in v0.10.0

type PendingStateUpdater interface {
	SyncPendingCreationKey(ctx context.Context, keyID uuid.UUID) error
	SyncPendingRegistrationKey(ctx context.Context, keyID uuid.UUID) error
}

PendingStateUpdater is implemented by KeyManager.

type WorkflowProcessor

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

func (*WorkflowProcessor) ProcessTask

func (s *WorkflowProcessor) ProcessTask(ctx context.Context, task *asynq.Task) error

func (*WorkflowProcessor) Role added in v0.9.0

func (*WorkflowProcessor) TaskType

func (s *WorkflowProcessor) TaskType() string

type WorkflowUpdater

type WorkflowUpdater interface {
	AutoAssignApprovers(ctx context.Context, workflowID uuid.UUID) (*model.Workflow, error)
	HandleTerminalWorkflow(ctx context.Context, workflow *model.Workflow) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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