Skip to content

Commit

Permalink
Add MetricsConfig to Deps
Browse files Browse the repository at this point in the history
  • Loading branch information
Achooo committed Apr 24, 2023
1 parent 0e8dfe5 commit 8852e8f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions agent/consul/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,12 @@ import (
"github.com/hashicorp/consul/agent/router"
"github.com/hashicorp/consul/agent/rpc/middleware"
"github.com/hashicorp/consul/agent/token"
"github.com/hashicorp/consul/lib"
"github.com/hashicorp/consul/tlsutil"
)

type Deps struct {
MetricsConfig *lib.MetricsConfig
EventPublisher *stream.EventPublisher
Logger hclog.InterceptLogger
TLSConfigurator *tlsutil.Configurator
Expand Down
1 change: 0 additions & 1 deletion agent/setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ type BaseDeps struct {
consul.Deps // TODO: un-embed

RuntimeConfig *config.RuntimeConfig
MetricsConfig *lib.MetricsConfig
AutoConfig *autoconf.AutoConfig // TODO: use an interface
Cache *cache.Cache
ViewStore *submatview.Store
Expand Down
1 change: 1 addition & 0 deletions lib/telemetry.go
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,7 @@ type TelemetryConfig struct {
type MetricsHandler interface {
DisplayMetrics(resp http.ResponseWriter, req *http.Request) (interface{}, error)
Stream(ctx context.Context, encoder metrics.Encoder)
Data() []*metrics.IntervalMetrics
}

type MetricsConfig struct {
Expand Down

0 comments on commit 8852e8f

Please sign in to comment.