Documentation ¶
Index ¶
- Variables
- func GetRegisteredAllocatorNames() []string
- func MakeNCollectors(n int, startingIndex int) map[string]*Collector
- func MakeNNewTargets(n int, numCollectors int, startingIndex int) map[string]*target.Item
- func MakeNNewTargetsWithEmptyCollectors(n int, startingIndex int) map[string]*target.Item
- func RecordTargetsKept(targets map[string]*target.Item)
- func Register(name string, provider AllocatorProvider) error
- type AllocationOption
- type Allocator
- type AllocatorProvider
- type Collector
- type Filter
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // TargetsPerCollector records how many targets have been assigned to each collector. // It is currently the responsibility of the strategy to track this information. TargetsPerCollector = promauto.NewGaugeVec(prometheus.GaugeOpts{ Name: "opentelemetry_allocator_targets_per_collector", Help: "The number of targets for each collector.", }, []string{"collector_name", "strategy"}) CollectorsAllocatable = promauto.NewGaugeVec(prometheus.GaugeOpts{ Name: "opentelemetry_allocator_collectors_allocatable", Help: "Number of collectors the allocator is able to allocate to.", }, []string{"strategy"}) TimeToAssign = promauto.NewHistogramVec(prometheus.HistogramOpts{ Name: "opentelemetry_allocator_time_to_allocate", Help: "The time it takes to allocate", }, []string{"method", "strategy"}) )
Functions ¶
func GetRegisteredAllocatorNames ¶
func GetRegisteredAllocatorNames() []string
func MakeNNewTargets ¶
func RecordTargetsKept ¶
func Register ¶
func Register(name string, provider AllocatorProvider) error
Types ¶
type AllocationOption ¶
type AllocationOption func(Allocator)
func WithFilter ¶
func WithFilter(filter Filter) AllocationOption
type Allocator ¶
type AllocatorProvider ¶
type AllocatorProvider func(log logr.Logger, opts ...AllocationOption) Allocator
type Collector ¶
Collector Creates a struct that holds Collector information. This struct will be parsed into endpoint with Collector and jobs info. This struct can be extended with information like annotations and labels in the future.
func NewCollector ¶
Click to show internal directories.
Click to hide internal directories.