Compare commits
1 commit
Author | SHA1 | Date | |
---|---|---|---|
|
ee58a9aefb |
2 changed files with 3 additions and 0 deletions
|
@ -70,6 +70,7 @@ type Leaky struct {
|
|||
wgPour *sync.WaitGroup
|
||||
wgDumpState *sync.WaitGroup
|
||||
mutex *sync.Mutex //used only for TIMEMACHINE mode to allow garbage collection without races
|
||||
labels map[string]string
|
||||
}
|
||||
|
||||
var BucketsPour = prometheus.NewCounterVec(
|
||||
|
@ -177,6 +178,7 @@ func FromFactory(bucketFactory BucketFactory) *Leaky {
|
|||
tomb: bucketFactory.tomb,
|
||||
wgPour: bucketFactory.wgPour,
|
||||
wgDumpState: bucketFactory.wgDumpState,
|
||||
labels: bucketFactory.Labels,
|
||||
mutex: &sync.Mutex{},
|
||||
}
|
||||
if l.BucketConfig.Capacity > 0 && l.BucketConfig.leakspeed != time.Duration(0) {
|
||||
|
|
|
@ -265,6 +265,7 @@ func NewAlert(leaky *Leaky, queue *Queue) (types.RuntimeAlert, error) {
|
|||
StartAt: &startAt,
|
||||
StopAt: &stopAt,
|
||||
Simulated: &leaky.Simulated,
|
||||
Labels: &leaky.labels,
|
||||
}
|
||||
if leaky.BucketConfig == nil {
|
||||
return runtimeAlert, fmt.Errorf("leaky.BucketConfig is nil")
|
||||
|
|
Loading…
Reference in a new issue