correlationid

package
v0.30.0 Latest Latest
Warning

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

Go to latest
Published: May 12, 2018 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const TagCorrelationID = "correlationid"

Variables

This section is empty.

Functions

func DefaultGeneratorSource added in v0.23.0

func DefaultGeneratorSource() *generatorSource

DefaultGeneratorSource returns a new correlation ID source which generates a new correlation ID. The underlying generator is a default random string generator.

func DefaultMetadataSource added in v0.23.0

func DefaultMetadataSource() *metadataSource

DefaultMetadataSource returns a correlation ID source which retrieves the correlation ID from gRPC metadata headers.

func NewGeneratorSource added in v0.23.0

func NewGeneratorSource(generator correlationIdGenerator) *generatorSource

NewGeneratorSource returns a new correlation ID source which generates a new correlation ID.

func NewMetadataSource added in v0.23.0

func NewMetadataSource(headers ...string) *metadataSource

NewMetadataSource returns a correlation ID source which retrieves the correlation ID from gRPC metadata headers.

func StreamServerInterceptor

func StreamServerInterceptor(opts ...Option) grpc.StreamServerInterceptor

StreamServerInterceptor returns a new streaming server interceptor for propagating correlation ID.

func UnaryServerInterceptor

func UnaryServerInterceptor(opts ...Option) grpc.UnaryServerInterceptor

UnaryServerInterceptor returns a new unary server interceptor for propagating correlation ID.

Types

type Option added in v0.23.0

type Option interface {
	// contains filtered or unexported methods
}

Option is used to define middleware configuration.

func Source added in v0.23.0

func Source(s ...correlationIdSource) Option

Source sets a set of correlation ID sources in the middleware.

func Store added in v0.23.0

func Store(s ...correlationIdStore) Option

Store sets a set of correlation ID stores in the middleware.

func WithSource added in v0.23.0

func WithSource(s ...correlationIdSource) Option

WithSource appends a set of correlation ID sources in the middleware.

func WithStore added in v0.23.0

func WithStore(s ...correlationIdStore) Option

WithStore appends a set of correlation ID stores in the middleware.

type Options added in v0.23.0

type Options []Option

Options is a set of middleware options together.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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