Documentation ¶
Index ¶
- func CheckContext(ctx context.Context) error
- func ClientContextInterceptor() grpc.UnaryClientInterceptor
- func Component(ctx context.Context) types.Component
- func ExportToOutgoing(outgoing context.Context) context.Context
- func ImportFromIncoming(ctx context.Context, opts ImportOptions) (context.Context, error)
- func Log(ctx context.Context) *zap.SugaredLogger
- func NewContext(providers ...providerInitInfo) context.Context
- func NewContextWithParent(parentCtx context.Context, providers ...providerInitInfo) context.Context
- func ServerContextInterceptor(options ImportOptions) grpc.UnaryServerInterceptor
- func StreamClientContextInterceptor() grpc.StreamClientInterceptor
- func StreamServerContextInterceptor(options ImportOptions) grpc.StreamServerInterceptor
- func SystemInfo(ctx context.Context) *types.SystemInfo
- func Tracer(ctx context.Context) opentracing.Tracer
- func UUID(ctx context.Context) string
- func WithProvider(kp Provider, opts ...withProviderOption) providerInitInfo
- func WithValue(value interface{}) withProviderOption
- type ImportOptions
- type InheritOptions
- type InitProvider
- type MetadataKey
- type Provider
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckContext ¶
CheckContext returns an error if the given context does not contain at least a component and UUID.
func ClientContextInterceptor ¶
func ClientContextInterceptor() grpc.UnaryClientInterceptor
func ImportFromIncoming ¶
func NewContext ¶
NewContext creates a new context containing data from the given metadata providers.
func NewContextWithParent ¶
func NewContextWithParent( parentCtx context.Context, providers ...providerInitInfo, ) context.Context
NewContextWithParent creates a new context parented to the given context, and containing data from metadata providers.
func ServerContextInterceptor ¶
func ServerContextInterceptor( options ImportOptions, ) grpc.UnaryServerInterceptor
func StreamClientContextInterceptor ¶
func StreamClientContextInterceptor() grpc.StreamClientInterceptor
func StreamServerContextInterceptor ¶
func StreamServerContextInterceptor( options ImportOptions, ) grpc.StreamServerInterceptor
func SystemInfo ¶
func SystemInfo(ctx context.Context) *types.SystemInfo
func WithProvider ¶
func WithProvider(kp Provider, opts ...withProviderOption) providerInitInfo
Types ¶
type ImportOptions ¶
type ImportOptions struct { Required []Provider Optional []Provider Inherit *InheritOptions }
type InheritOptions ¶
type InitProvider ¶
type MetadataKey ¶
Click to show internal directories.
Click to hide internal directories.