package baggage
import "github.com/uber/jaeger-client-go/internal/baggage"
Index ¶
- type DefaultRestrictionManager
- func NewDefaultRestrictionManager(maxValueLength int) *DefaultRestrictionManager
- func (m *DefaultRestrictionManager) GetRestriction(service, key string) *Restriction
- type Restriction
- func NewRestriction(keyAllowed bool, maxValueLength int) *Restriction
- func (r *Restriction) KeyAllowed() bool
- func (r *Restriction) MaxValueLength() int
- type RestrictionManager
Types ¶
type DefaultRestrictionManager ¶
type DefaultRestrictionManager struct {
// contains filtered or unexported fields
}
DefaultRestrictionManager allows any baggage key.
func NewDefaultRestrictionManager ¶
func NewDefaultRestrictionManager(maxValueLength int) *DefaultRestrictionManager
NewDefaultRestrictionManager returns a DefaultRestrictionManager.
func (*DefaultRestrictionManager) GetRestriction ¶
func (m *DefaultRestrictionManager) GetRestriction(service, key string) *Restriction
GetRestriction implements RestrictionManager#GetRestriction.
type Restriction ¶
type Restriction struct {
// contains filtered or unexported fields
}
Restriction determines whether a baggage key is allowed and contains any restrictions on the baggage value.
func NewRestriction ¶
func NewRestriction(keyAllowed bool, maxValueLength int) *Restriction
NewRestriction returns a new Restriction.
func (*Restriction) KeyAllowed ¶
func (r *Restriction) KeyAllowed() bool
KeyAllowed returns whether the baggage key for this restriction is allowed.
func (*Restriction) MaxValueLength ¶
func (r *Restriction) MaxValueLength() int
MaxValueLength returns the max length for the baggage value.
type RestrictionManager ¶
type RestrictionManager interface { GetRestriction(service, key string) *Restriction }
RestrictionManager keeps track of valid baggage keys and their restrictions. The manager will return a Restriction for a specific baggage key which will determine whether the baggage key is allowed for the current service and any other applicable restrictions on the baggage value.
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
internal/baggage/remote |
- Version
- v2.30.0+incompatible (latest)
- Published
- Dec 7, 2021
- Platform
- linux/amd64
- Last checked
- 7 hours ago –
Tools for package owners.