Documentation ¶
Index ¶
- Variables
- type Fanout
- type GlobalRefMap
- func (g *GlobalRefMap) AddStaleMarker(globalRefID uint64, l labels.Labels)
- func (g *GlobalRefMap) CheckStaleMarkers()
- func (g *GlobalRefMap) GetGlobalRefID(componentID string, localRefID uint64) uint64
- func (g *GlobalRefMap) GetLocalRefID(componentID string, globalRefID uint64) uint64
- func (g *GlobalRefMap) GetOrAddGlobalRefID(l labels.Labels) uint64
- func (g *GlobalRefMap) GetOrAddLink(componentID string, localRefID uint64, lbls labels.Labels) uint64
- func (g *GlobalRefMap) RemoveStaleMarker(globalRefID uint64)
- type Interceptor
- type InterceptorOption
- type NoopMetadataStore
Constants ¶
This section is empty.
Variables ¶
var GlobalRefMapping = &GlobalRefMap{}
GlobalRefMapping is used when translating to and from remote writes and the rest of the system (mostly scrapers) normal components except those should in general NOT need this.
Functions ¶
This section is empty.
Types ¶
type Fanout ¶ added in v0.29.0
type Fanout struct {
// contains filtered or unexported fields
}
Fanout supports the default Flow style of appendables since it can go to multiple outputs. It also allows the intercepting of appends.
func NewFanout ¶ added in v0.29.0
func NewFanout(children []storage.Appendable, componentID string, register prometheus.Registerer) *Fanout
NewFanout creates a fanout appendable.
func (*Fanout) UpdateChildren ¶ added in v0.29.0
func (f *Fanout) UpdateChildren(children []storage.Appendable)
UpdateChildren allows changing of the children of the fanout.
type GlobalRefMap ¶
type GlobalRefMap struct {
// contains filtered or unexported fields
}
GlobalRefMap allows conversion from remote_write refids to global refs ids that everything else can use
func (*GlobalRefMap) AddStaleMarker ¶
func (g *GlobalRefMap) AddStaleMarker(globalRefID uint64, l labels.Labels)
AddStaleMarker adds a stale marker
func (*GlobalRefMap) CheckStaleMarkers ¶
func (g *GlobalRefMap) CheckStaleMarkers()
CheckStaleMarkers is called to garbage collect and items that have grown stale over stale duration (10m)
func (*GlobalRefMap) GetGlobalRefID ¶
func (g *GlobalRefMap) GetGlobalRefID(componentID string, localRefID uint64) uint64
GetGlobalRefID returns the global refid for a component local combo, or 0 if not found
func (*GlobalRefMap) GetLocalRefID ¶
func (g *GlobalRefMap) GetLocalRefID(componentID string, globalRefID uint64) uint64
GetLocalRefID returns the local refid for a component global combo, or 0 if not found
func (*GlobalRefMap) GetOrAddGlobalRefID ¶
func (g *GlobalRefMap) GetOrAddGlobalRefID(l labels.Labels) uint64
GetOrAddGlobalRefID is used to create a global refid for a labelset
func (*GlobalRefMap) GetOrAddLink ¶
func (g *GlobalRefMap) GetOrAddLink(componentID string, localRefID uint64, lbls labels.Labels) uint64
GetOrAddLink is called by a remote_write endpoint component to add mapping and get back the global id.
func (*GlobalRefMap) RemoveStaleMarker ¶
func (g *GlobalRefMap) RemoveStaleMarker(globalRefID uint64)
RemoveStaleMarker removes a stale marker
type Interceptor ¶ added in v0.29.0
type Interceptor struct {
// contains filtered or unexported fields
}
Interceptor is a storage.Appendable which invokes callback functions upon getting data. Interceptor should not be modified once created. All callback fields are optional.
func NewInterceptor ¶ added in v0.29.0
func NewInterceptor(next storage.Appendable, opts ...InterceptorOption) *Interceptor
NewInterceptor creates a new Interceptor storage.Appendable. Options can be provided to NewInterceptor to install custom hooks for different methods.
type InterceptorOption ¶ added in v0.30.0
type InterceptorOption func(*Interceptor)
InterceptorOption is an option argument passed to NewInterceptor.
func WithAppendHistogram ¶ added in v0.30.0
func WithAppendHistogram(f func(ref storage.SeriesRef, l labels.Labels, t int64, h *histogram.Histogram, next storage.Appender) (storage.SeriesRef, error)) InterceptorOption
WithAppendHistogram returns an InterceptorOption which hooks into calls to AppendHistogram.
func WithAppendHook ¶ added in v0.30.0
func WithAppendHook(f func(ref storage.SeriesRef, l labels.Labels, t int64, v float64, next storage.Appender) (storage.SeriesRef, error)) InterceptorOption
WithAppendHook returns an InterceptorOption which hooks into calls to Append.
type NoopMetadataStore ¶ added in v0.29.0
type NoopMetadataStore map[string]scrape.MetricMetadata
NoopMetadataStore implements the MetricMetadataStore interface.
func (NoopMetadataStore) GetMetadata ¶ added in v0.29.0
func (ms NoopMetadataStore) GetMetadata(familyName string) (scrape.MetricMetadata, bool)
GetMetadata implements the MetricMetadataStore interface.
func (NoopMetadataStore) LengthMetadata ¶ added in v0.29.0
func (ms NoopMetadataStore) LengthMetadata() int
LengthMetadata implements the MetricMetadataStore interface.
func (NoopMetadataStore) ListMetadata ¶ added in v0.29.0
func (ms NoopMetadataStore) ListMetadata() []scrape.MetricMetadata
ListMetadata implements the MetricMetadataStore interface.
func (NoopMetadataStore) SizeMetadata ¶ added in v0.29.0
func (ms NoopMetadataStore) SizeMetadata() int
SizeMetadata implements the MetricMetadataStore interface.