Documentation ¶
Index ¶
- type CustomTrackersConfig
- func (c CustomTrackersConfig) Empty() bool
- func (c CustomTrackersConfig) Equal(other CustomTrackersConfig) bool
- func (c CustomTrackersConfig) ExampleDoc() (comment string, yaml interface{})
- func (c CustomTrackersConfig) MarshalYAML() (interface{}, error)
- func (c *CustomTrackersConfig) Set(s string) error
- func (c CustomTrackersConfig) String() string
- func (c *CustomTrackersConfig) UnmarshalYAML(value *yaml.Node) error
- type Matchers
- type PreAllocDynamicSlice
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CustomTrackersConfig ¶
type CustomTrackersConfig struct {
// contains filtered or unexported fields
}
CustomTrackersConfig configures active series custom trackers. It can be set using a flag, or parsed from yaml.
func NewCustomTrackersConfig ¶
func NewCustomTrackersConfig(m map[string]string) (c CustomTrackersConfig, err error)
func (CustomTrackersConfig) Empty ¶
func (c CustomTrackersConfig) Empty() bool
func (CustomTrackersConfig) Equal ¶
func (c CustomTrackersConfig) Equal(other CustomTrackersConfig) bool
Equal compares two CustomTrackersConfig. This is needed to allow cmp.Equal to compare two CustomTrackersConfig.
func (CustomTrackersConfig) ExampleDoc ¶
func (c CustomTrackersConfig) ExampleDoc() (comment string, yaml interface{})
ExampleDoc provides an example doc for this config, especially valuable since it's custom-unmarshaled.
func (CustomTrackersConfig) MarshalYAML ¶
func (c CustomTrackersConfig) MarshalYAML() (interface{}, error)
MarshalYAML implements yaml.Marshaler.
func (*CustomTrackersConfig) Set ¶
func (c *CustomTrackersConfig) Set(s string) error
Set implements flag.Value, and is used to set the config value from a flag value provided as string.
func (CustomTrackersConfig) String ¶
func (c CustomTrackersConfig) String() string
String is a canonical representation of the config, it is compatible with flag definition. String is also needed to implement flag.Value.
func (*CustomTrackersConfig) UnmarshalYAML ¶
func (c *CustomTrackersConfig) UnmarshalYAML(value *yaml.Node) error
UnmarshalYAML implements the yaml.Unmarshaler interface. CustomTrackersConfig are marshaled in yaml as a map[string]string, with matcher names as keys and strings as matchers definitions.
type Matchers ¶
type Matchers struct {
// contains filtered or unexported fields
}
func NewMatchers ¶
func NewMatchers(matchersConfig CustomTrackersConfig) *Matchers
func (*Matchers) Config ¶
func (m *Matchers) Config() CustomTrackersConfig
func (*Matchers) MatcherNames ¶
type PreAllocDynamicSlice ¶
type PreAllocDynamicSlice struct {
// contains filtered or unexported fields
}
PreAllocDynamicSlice is a slice-like uint16 data structure that allocates space for the first `preAllocatedSize` elements. When more than `preAllocatedSize` elements are appended, it allocates a slice that escapes to heap. This trades in extra allocated space (2x more with `preAllocatedSize=3`) for zero-allocations in most of the cases, relying on the assumption that most of the matchers will not match more than `preAllocatedSize` trackers.
func (*PreAllocDynamicSlice) Append ¶
func (fs *PreAllocDynamicSlice) Append(val int)
func (*PreAllocDynamicSlice) Get ¶
func (fs *PreAllocDynamicSlice) Get(idx int) uint16
func (*PreAllocDynamicSlice) Len ¶
func (fs *PreAllocDynamicSlice) Len() int