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

Function ActorFromContext

aibridge/context/context.go:22–29  ·  view source on GitHub ↗
(ctx context.Context)

Source from the content-addressed store, hash-verified

20}
21
22func ActorFromContext(ctx context.Context) *Actor {
23 a, ok := ctx.Value(actorContextKey{}).(*Actor)
24 if !ok {
25 return nil
26 }
27
28 return a
29}
30
31// ActorIDFromContext safely extracts the actor ID from the context.
32// Returns an empty string if no actor is found.

Callers 1

ActorIDFromContextFunction · 0.70

Calls 1

ValueMethod · 0.45

Tested by

no test coverage detected