(ctx context.Context)
| 20 | } |
| 21 | |
| 22 | func 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. |
no test coverage detected