MCPcopy Index your code
hub / github.com/docker/docker-agent / ToolOutputEmitterFromContext

Function ToolOutputEmitterFromContext

pkg/tools/tools.go:67–70  ·  view source on GitHub ↗

ToolOutputEmitterFromContext returns the incremental-output emitter attached to ctx, if any.

(ctx context.Context)

Source from the content-addressed store, hash-verified

65// ToolOutputEmitterFromContext returns the incremental-output emitter attached
66// to ctx, if any.
67func ToolOutputEmitterFromContext(ctx context.Context) (ToolOutputEmitter, bool) {
68 emit, ok := ctx.Value(toolOutputEmitterKey{}).(ToolOutputEmitter)
69 return emit, ok
70}
71
72// EmitOutput streams output through the emitter in ctx. It returns false when
73// no emitter is attached or output is empty.

Callers 2

newCommandOutputFunction · 0.92
EmitOutputFunction · 0.85

Calls 1

ValueMethod · 0.65

Tested by

no test coverage detected