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

Function streamSubscriberControlFetchContext

coderd/x/chatd/chatd.go:4904–4909  ·  view source on GitHub ↗

streamSubscriberControlFetchContext keeps a control-path lookup tied to the requesting subscriber while applying a fallback timeout when the caller has no deadline.

(ctx context.Context)

Source from the content-addressed store, hash-verified

4902// requesting subscriber while applying a fallback timeout when the caller has
4903// no deadline.
4904func streamSubscriberControlFetchContext(ctx context.Context) (context.Context, context.CancelFunc) {
4905 if _, ok := ctx.Deadline(); ok {
4906 return ctx, func() {}
4907 }
4908 return context.WithTimeout(ctx, chatStreamControlFetchTimeout)
4909}
4910
4911func subscribeWithInitialError(chatID uuid.UUID, message string) (
4912 []codersdk.ChatStreamEvent,

Callers 1

SubscribeAuthorizedMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected