Skip to content

Commit

Permalink
change dir
Browse files Browse the repository at this point in the history
  • Loading branch information
timam committed Sep 30, 2023
1 parent ba92fd9 commit d29b860
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 11 deletions.
2 changes: 1 addition & 1 deletion svc/genie/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ RUN mkdir /statuz/utils/
COPY ../../utils /statuz/utils/

RUN mkdir -p /statuz/svc/genie
COPY ./cmd/genie /statuz/cmd/genie
COPY ./svc/genie /statuz/svc/genie

RUN go build -o /statuz/bin/genie -ldflags '-w -s' -tags netgo -a -installsuffix cgo -v ./svc/genie

Expand Down
5 changes: 1 addition & 4 deletions svc/watcher/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,8 @@ COPY ../../go.mod ../../go.sum ./
RUN mkdir /statuz/utils/
COPY ../../utils /statuz/utils/

RUN mkdir /statuz/config/
COPY ../../config /statuz/config/

RUN mkdir -p /statuz/svc/watcher
COPY ./cmd/watcher /statuz/cmd/watcher
COPY ./svc/watcher /statuz/svc/watcher

RUN go build -o /statuz/bin/watcher -ldflags '-w -s' -tags netgo -a -installsuffix cgo -v ./svc/watcher

Expand Down
4 changes: 2 additions & 2 deletions svc/watcher/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package main
import (
"errors"
"github.com/prometheus/client_golang/prometheus/promhttp"
"github.com/statuzproj/statuz/config"
"github.com/statuzproj/statuz/utils/evictedconf"
"github.com/statuzproj/statuz/utils/healthz"
"log"
"net/http"
Expand All @@ -21,7 +21,7 @@ func main() {
}

func start() error {
env, err := config.GetEnvVars()
env, err := evictedconf.GetEnvVars()
if err != nil {
return err
}
Expand Down
2 changes: 1 addition & 1 deletion config/env.go → utils/evictedconf/env.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package config
package evictedconf

import (
"errors"
Expand Down
2 changes: 1 addition & 1 deletion config/metric.go → utils/evictedconf/metric.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package config
package evictedconf

func MetricName() string {

Expand Down
4 changes: 2 additions & 2 deletions utils/prometheus/gauge.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ package prometheus

import (
"github.com/prometheus/client_golang/prometheus"
"github.com/statuzproj/statuz/config"
"github.com/statuzproj/statuz/utils/evictedconf"
"net/http"
)

func SetWebpagePrometheusMetric(url string, status int64) {
metric := config.MetricName()
metric := evictedconf.MetricName()
gauge := prometheus.NewGaugeVec(
prometheus.GaugeOpts{
Name: metric,
Expand Down

0 comments on commit d29b860

Please sign in to comment.