Documentation
¶
Index ¶
Constants ¶
View Source
const ComponentType runtime.ComponentType = "counter manager"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Counter ¶
type Counter struct {
// contains filtered or unexported fields
}
func NewCounter ¶
func (*Counter) GetByGroup ¶
type CounterManager ¶
type CounterManager interface {
RegisterSimpleCounter(kind resmodel.ResourceKind)
RegisterDistributionCounter(kind resmodel.ResourceKind, metric CounterType, extractor FieldExtractor)
Count(kind resmodel.ResourceKind) int64
Distribution(metric CounterType) map[string]int64
CountByMesh(kind resmodel.ResourceKind, mesh string) int64
DistributionByMesh(metric CounterType, mesh string) map[string]int64
Reset()
Bind(bus events.EventBus) error
}
func NewCounterManager ¶
func NewCounterManager() CounterManager
type CounterType ¶
type CounterType string
const ( ProtocolCounter CounterType = "protocol" ReleaseCounter CounterType = "release" DiscoveryCounter CounterType = "discovery" )
type DistributionCounter ¶
type DistributionCounter struct {
// contains filtered or unexported fields
}
func NewDistributionCounter ¶
func NewDistributionCounter(name string) *DistributionCounter
func (*DistributionCounter) Decrement ¶
func (c *DistributionCounter) Decrement(group, key string)
func (*DistributionCounter) GetAll ¶
func (c *DistributionCounter) GetAll() map[string]int64
func (*DistributionCounter) GetByGroup ¶
func (c *DistributionCounter) GetByGroup(group string) map[string]int64
func (*DistributionCounter) Increment ¶
func (c *DistributionCounter) Increment(group, key string)
func (*DistributionCounter) Reset ¶
func (c *DistributionCounter) Reset()
type FieldExtractor ¶
type ManagerComponent ¶
type ManagerComponent interface {
runtime.Component
CounterManager() CounterManager
}
Click to show internal directories.
Click to hide internal directories.