Skip to content

Commit

Permalink
fix: prometheus init
Browse files Browse the repository at this point in the history
  • Loading branch information
haveachin committed Dec 27, 2022
1 parent 4329570 commit 6edf3ae
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion internal/plugin/api/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ func (p Plugin) Version() string {
return "internal"
}

func (p Plugin) Init() {}
func (p *Plugin) Init() {}

func (p *Plugin) Load(cfg map[string]any) error {
if err := config.Unmarshal(cfg, &p.Config); err != nil {
Expand Down
2 changes: 1 addition & 1 deletion internal/plugin/prometheus/prometheus.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ func (p Plugin) Version() string {
return "internal"
}

func (p Plugin) Init() {
func (p *Plugin) Init() {
mux := http.NewServeMux()
mux.Handle("/metrics", promhttp.Handler())
p.mux = mux
Expand Down
2 changes: 1 addition & 1 deletion internal/plugin/traffic_limiter/traffic_limiter.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ func (p Plugin) Version() string {
return "internal"
}

func (p Plugin) Init() {}
func (p *Plugin) Init() {}

func (p *Plugin) Load(cfg map[string]any) error {
if err := config.Unmarshal(cfg, &p.Config); err != nil {
Expand Down
2 changes: 1 addition & 1 deletion internal/plugin/webhook/webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ func (p Plugin) Version() string {
return "internal"
}

func (p Plugin) Init() {}
func (p *Plugin) Init() {}

func (p *Plugin) Load(cfg map[string]any) error {
if err := config.Unmarshal(cfg, &p.Config); err != nil {
Expand Down

0 comments on commit 6edf3ae

Please sign in to comment.