diff --git a/internal/config/config.go b/internal/config/config.go index 94287e2..062f9d8 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -13,7 +13,7 @@ type Config struct { URL string `env:"HYSTRIX_URL,required"` Clusters []string `env:"HYSTRIX_CLUSTERS"` ReportLatencies []string `env:"HYSTRIX_REPORT_LATENCIES" envSeparator:"," envDefault:"100th,99.5th,99th,95th,90th,75th,50th,25th,0th,mean"` - ReportInterval int `env:"HYSTRIX_REPORT_INTERVAL" envDefault:"5"` + ReportInterval float64 `env:"HYSTRIX_REPORT_INTERVAL" envDefault:"5"` } // Get the config diff --git a/internal/report/librato/librato.go b/internal/report/librato/librato.go index add8e44..d9d2657 100644 --- a/internal/report/librato/librato.go +++ b/internal/report/librato/librato.go @@ -12,7 +12,7 @@ import ( ) // New report type -func New(user, token string, metrics []string, interval int) *Librato { +func New(user, token string, metrics []string, interval float64) *Librato { return &Librato{ user: user, token: token, @@ -30,7 +30,7 @@ type Librato struct { reports map[string]time.Time lock sync.RWMutex metrics []string - interval int + interval float64 } // Report the given data to librato for the given cluster