// FromContext returns the authInfo in ctx if it exists. func FromContext(ctx context.Context) (authInfo AuthInfo, ok bool) { authInfo, ok = ctx.Value(authInfoKey{}).(AuthInfo) return }
// StreamFromContext returns the stream saved in ctx. func StreamFromContext(ctx context.Context) (s *Stream, ok bool) { s, ok = ctx.Value(streamKey).(*Stream) return }
// FromContext returns the Trace bound to the context, if any. func FromContext(ctx context.Context) (tr Trace, ok bool) { tr, ok = ctx.Value(contextKey).(Trace) return }