Documentation
¶
Index ¶
Constants ¶
View Source
const ( WritingStatus = iota PendingStatus ClosedStatus )
View Source
const ( SizeWeight float64 = 0.6 TimeWeight float64 = 0.4 FullCapacity float64 = 0.85 )
View Source
const MinBufferSize = 1
View Source
const Unknown = "unknown"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CollectorType ¶ added in v1.0.4
type CollectorType int
const ( PrometheusCollector CollectorType = iota OpenTelemetryCollector )
func (CollectorType) String ¶ added in v1.0.4
func (c CollectorType) String() string
func (CollectorType) Validate ¶ added in v1.0.4
func (c CollectorType) Validate() bool
type DefaultStrategy ¶ added in v1.0.4
type DefaultStrategy struct{}
func (*DefaultStrategy) NeedSwitch ¶ added in v1.0.4
func (d *DefaultStrategy) NeedSwitch(currentCount, bufferSize int32, elapsed, interval time.Duration) bool
type OperationType ¶ added in v1.0.4
type OperationType int
const ( MetricsIncOp OperationType = iota MetricsDecOp )
type SizeOnlyStrategy ¶ added in v1.0.4
type SizeOnlyStrategy struct{}
func (*SizeOnlyStrategy) NeedSwitch ¶ added in v1.0.4
func (s *SizeOnlyStrategy) NeedSwitch(currentCount, bufferSize int32, _, _ time.Duration) bool
type SwitchStatus ¶ added in v1.0.4
type SwitchStatus int
const ( SwitchSuccess SwitchStatus = iota SwitchFailure SwitchSkip )
func (SwitchStatus) String ¶ added in v1.0.4
func (s SwitchStatus) String() string
type SwitchStrategy ¶ added in v1.0.4
type SwitchStrategy interface {
NeedSwitch(currentCount, bufferSize int32, elapsed, interval time.Duration) bool
}
func NewDefaultStrategy ¶ added in v1.0.4
func NewDefaultStrategy() SwitchStrategy
func NewSizeOnlyStrategy ¶ added in v1.0.4
func NewSizeOnlyStrategy() SwitchStrategy
func NewTimeWindowOnlyStrategy ¶ added in v1.0.4
func NewTimeWindowOnlyStrategy() SwitchStrategy
type TimeWindowOnlyStrategy ¶ added in v1.0.4
type TimeWindowOnlyStrategy struct{}
func (*TimeWindowOnlyStrategy) NeedSwitch ¶ added in v1.0.4
func (s *TimeWindowOnlyStrategy) NeedSwitch(_, _ int32, elapsed, interval time.Duration) bool
Click to show internal directories.
Click to hide internal directories.