MCPcopy
hub / github.com/livekit/livekit / ContextWithAttempt

Function ContextWithAttempt

pkg/utils/context.go:28–30  ·  view source on GitHub ↗
(ctx context.Context, attempt int)

Source from the content-addressed store, hash-verified

26type loggerKey = struct{}
27
28func ContextWithAttempt(ctx context.Context, attempt int) context.Context {
29 return context.WithValue(ctx, attemptKey{}, attempt)
30}
31
32func GetAttempt(ctx context.Context) int {
33 if attempt, ok := ctx.Value(attemptKey{}).(int); ok {

Callers 1

serveMethod · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected