mirror of
https://github.com/openfaas/faas.git
synced 2025-06-25 00:03:24 +00:00
Refactoring: variable names, adding tests and http constants
Signed-off-by: Alex Ellis <alexellis2@gmail.com>
This commit is contained in:
@ -15,8 +15,9 @@ import (
|
||||
|
||||
// AttachSwarmWatcher adds a go-route to monitor the amount of service replicas in the swarm
|
||||
// matching a 'function' label.
|
||||
func AttachSwarmWatcher(dockerClient *client.Client, metricsOptions MetricOptions, label string) {
|
||||
ticker := time.NewTicker(1 * time.Second)
|
||||
func AttachSwarmWatcher(dockerClient *client.Client, metricsOptions MetricOptions, label string, interval time.Duration) {
|
||||
ticker := time.NewTicker(interval)
|
||||
|
||||
quit := make(chan struct{})
|
||||
|
||||
go func() {
|
||||
@ -47,5 +48,4 @@ func AttachSwarmWatcher(dockerClient *client.Client, metricsOptions MetricOption
|
||||
}
|
||||
}
|
||||
}()
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user