Documentation ¶
Index ¶
- Variables
- type Option
- type RestrictionManager
- func (m *RestrictionManager) Close() error
- func (RestrictionManager) DenyBaggageOnInitializationFailure(b bool) Option
- func (m *RestrictionManager) GetRestriction(service, key string) *baggage.Restriction
- func (RestrictionManager) HostPort(hostPort string) Option
- func (RestrictionManager) Logger(logger jaeger.Logger) Option
- func (RestrictionManager) Metrics(m *jaeger.Metrics) Option
- func (RestrictionManager) RefreshInterval(refreshInterval time.Duration) Option
Constants ¶
This section is empty.
Variables ¶
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 ¶
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 ¶
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 ¶
RefreshInterval creates an Option that sets how often the RestrictionManager will poll local agent for the baggage restrictions.