Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ on:
push:
tags:
- "*"
branches:
- refactor/v2

permissions: write-all

Expand All @@ -29,7 +31,8 @@ jobs:
images: ghcr.io/inc4/gonka-exporter-go
tags: |
type=ref,event=tag
type=raw,value=latest
type=raw,value=latest,enable=${{ github.ref_type == 'tag' }}
type=raw,value=dev,enable=${{ github.ref_type == 'branch' }}

- name: Build and push
uses: docker/build-push-action@v5
Expand Down
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Compiled binaries
exporter
gonka-exporter
/exporter
/gonka-exporter
*.exe

# Environment files
Expand Down
4 changes: 3 additions & 1 deletion cmd/exporter/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,12 @@ import (
"syscall"
"time"

"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/promhttp"

"github.com/gonka/exporter/internal/collector"
"github.com/gonka/exporter/internal/config"
"github.com/gonka/exporter/internal/fetcher"
)

func main() {
Expand All @@ -37,7 +39,7 @@ func main() {
slog.Warn("PARTICIPANT_ADDRESS is not set — participant metrics will be skipped")
}

c := collector.New(cfg)
c := collector.New(cfg, fetcher.NewHTTPFetcher(), prometheus.DefaultRegisterer)

mux := http.NewServeMux()
mux.Handle("/metrics", promhttp.Handler())
Expand Down
Loading
Loading