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: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

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 DefaultHeaderSource added in v0.23.0

func DefaultHeaderSource() *headerSource

DefaultHeaderSource returns a correlation ID source which retrieves the correlation ID from common HTTP headers.

func New

func New(options ...Option) *middleware

New returns a new correlation ID middleware.

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 NewHeaderSource added in v0.23.0

func NewHeaderSource(headers ...string) *headerSource

NewHeaderSource returns a correlation ID source which retrieves the correlation ID from given HTTP headers.

Types

type Option

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