MCPcopy Index your code
hub / github.com/coder/coder / withAttemptSink

Function withAttemptSink

coderd/x/chatd/chatdebug/recorder.go:88–93  ·  view source on GitHub ↗
(ctx context.Context, sink *attemptSink)

Source from the content-addressed store, hash-verified

86type attemptSinkKey struct{}
87
88func withAttemptSink(ctx context.Context, sink *attemptSink) context.Context {
89 if sink == nil {
90 panic("chatdebug: nil attemptSink")
91 }
92 return context.WithValue(ctx, attemptSinkKey{}, sink)
93}
94
95func attemptSinkFromContext(ctx context.Context) *attemptSink {
96 sink, _ := ctx.Value(attemptSinkKey{}).(*attemptSink)

Callers 3

TestAttemptSinkContextFunction · 0.85
newTestSinkContextFunction · 0.85
beginStepFunction · 0.85

Calls

no outgoing calls

Tested by 2

TestAttemptSinkContextFunction · 0.68
newTestSinkContextFunction · 0.68