MCPcopy Create free account
hub / github.com/flant/shell-operator / WithHandler

Function WithHandler

pkg/task/queue/task_queue.go:150–154  ·  view source on GitHub ↗

WithHandler sets the task handler for the TaskQueue

(fn func(ctx context.Context, t task.Task) TaskResult)

Source from the content-addressed store, hash-verified

148
149// WithHandler sets the task handler for the TaskQueue
150func WithHandler(fn func(ctx context.Context, t task.Task) TaskResult) TaskQueueOption {
151 return func(q *TaskQueue) {
152 q.Handler = fn
153 }
154}
155
156// WithCompactableTypes sets the compactable task types for the TaskQueue
157func WithCompactableTypes(taskTypes ...task.TaskType) TaskQueueOption {

Callers 1

NewNamedQueueMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected