MCPcopy
hub / github.com/docker/docker-agent / Handler

Interface Handler

pkg/hooks/handler.go:25–27  ·  view source on GitHub ↗

Handler executes a single hook invocation. It is built by a [HandlerFactory] for one [Hook] and invoked at most once. The executor wraps ctx with the hook's timeout before calling Run, so handlers MUST NOT apply [Hook.GetTimeout] themselves.

Source from the content-addressed store, hash-verified

23// executor wraps ctx with the hook's timeout before calling Run, so
24// handlers MUST NOT apply [Hook.GetTimeout] themselves.
25type Handler interface {
26 Run(ctx context.Context, input []byte) (HandlerResult, error)
27}
28
29// HandlerResult is the raw outcome of a [Handler.Run] call.
30//

Callers 8

mainFunction · 0.65
TestParseFunction · 0.65
TestIsValidFunction · 0.65
TestForOpenAIFunction · 0.65
TestForAnthropicFunction · 0.65
TestBedrockTokensFunction · 0.65
TestForGemini3Function · 0.65
TestIsValidAdaptiveFunction · 0.65

Implementers 13

queueTestRuntimepkg/tui/page/chat/queue_test.go
cycleThinkingRuntimepkg/leantui/update_test.go
mockRuntimepkg/cli/runner_test.go
Apppkg/app/app.go
mockRuntimepkg/app/app_test.go
LocalRuntimepkg/runtime/runtime.go
mockRuntimepkg/runtime/commands_test.go
RemoteRuntimepkg/runtime/remote_runtime.go
Runnerpkg/evaluation/eval.go
commandHandlerpkg/hooks/handler.go
builtinHandlerpkg/hooks/handler.go
modelHandlerpkg/hooks/model_handler.go

Calls

no outgoing calls

Tested by

no test coverage detected