remote

package
v2.19.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2019 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Options options

Options is a factory for all available options

Functions

This section is empty.

Types

type Option

type Option func(options *options)

Option is a function that sets some option on the RestrictionManager

type RestrictionManager

type RestrictionManager struct {
	// contains filtered or unexported fields
}

RestrictionManager manages baggage restrictions by retrieving baggage restrictions from agent

func NewRestrictionManager

func NewRestrictionManager(serviceName string, options ...Option) *RestrictionManager

NewRestrictionManager returns a BaggageRestrictionManager that polls the agent for the latest baggage restrictions.

func (*RestrictionManager) Close

func (m *RestrictionManager) Close() error

Close stops remote polling and closes the RemoteRestrictionManager.

func (RestrictionManager) DenyBaggageOnInitializationFailure

func (RestrictionManager) DenyBaggageOnInitializationFailure(b bool) Option

DenyBaggageOnInitializationFailure creates an Option that determines the startup failure mode of RestrictionManager. If DenyBaggageOnInitializationFailure is true, RestrictionManager will not allow any baggage to be written until baggage restrictions have been retrieved from agent. If DenyBaggageOnInitializationFailure is false, RestrictionManager will allow any baggage to be written until baggage restrictions have been retrieved from agent.

func (*RestrictionManager) GetRestriction

func (m *RestrictionManager) GetRestriction(service, key string) *baggage.Restriction

GetRestriction implements RestrictionManager#GetRestriction.

func (RestrictionManager) HostPort

func (RestrictionManager) HostPort(hostPort string) Option

HostPort creates an Option that sets the hostPort of the local agent that contains the baggage restrictions.

func (RestrictionManager) Logger

func (RestrictionManager) Logger(logger jaeger.Logger) Option

Logger creates an Option that sets the logger used by the RestrictionManager.

func (RestrictionManager) Metrics

func (RestrictionManager) Metrics(m *jaeger.Metrics) Option

Metrics creates an Option that initializes Metrics on the RestrictionManager, which is used to emit statistics.

func (RestrictionManager) RefreshInterval

func (RestrictionManager) RefreshInterval(refreshInterval time.Duration) Option

RefreshInterval creates an Option that sets how often the RestrictionManager will poll local agent for the baggage restrictions.

Jump to

Keyboard shortcuts

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