octtrpc

package
v0.0.0-...-2393a11 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 13, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClientInterceptor

func ClientInterceptor(opts ...Option) ttrpc.UnaryClientInterceptor

ClientInterceptor returns a TTRPC unary client interceptor that automatically creates a new span for outgoing TTRPC calls, and passes the span context as metadata on the call.

func ServerInterceptor

func ServerInterceptor(opts ...Option) ttrpc.UnaryServerInterceptor

ServerInterceptor returns a TTRPC unary server interceptor that automatically creates a new span for incoming TTRPC calls, and parents the span to the span context received via metadata, if it exists.

Types

type Option

type Option func(*options)

Option represents an option function that can be used with the OC TTRPC interceptors.

func WithSampler

func WithSampler(sampler trace.Sampler) Option

WithSampler returns an option function to set the OC sampler used for the auto-created spans.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL