Skip to content

Commit

Permalink
refactoring (with go-common)
Browse files Browse the repository at this point in the history
Signed-off-by: Markus Blaschke <[email protected]>
  • Loading branch information
mblaschke committed Apr 10, 2022
1 parent 9bcb798 commit 42c9daf
Show file tree
Hide file tree
Showing 16 changed files with 176 additions and 414 deletions.
125 changes: 0 additions & 125 deletions collector_base.go

This file was deleted.

80 changes: 0 additions & 80 deletions collector_general.go

This file was deleted.

35 changes: 0 additions & 35 deletions collector_processor_general.go

This file was deleted.

9 changes: 5 additions & 4 deletions config/opts.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,18 @@ package config

import (
"encoding/json"
log "github.com/sirupsen/logrus"
"time"

log "github.com/sirupsen/logrus"
)

type (
Opts struct {
// logger
Logger struct {
Debug bool ` long:"debug" env:"DEBUG" description:"debug mode"`
Verbose bool `short:"v" long:"verbose" env:"VERBOSE" description:"verbose mode"`
LogJson bool ` long:"log.json" env:"LOG_JSON" description:"Switch log output to json format"`
Debug bool `long:"log.debug" env:"LOG_DEBUG" description:"debug mode"`
Trace bool `long:"log.trace" env:"LOG_TRACE" description:"trace mode"`
Json bool `long:"log.json" env:"LOG_JSON" description:"Switch log output to json format"`
}

// PagerDuty settings
Expand Down
4 changes: 3 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ require (
google.golang.org/protobuf v1.27.1 // indirect
)

require github.com/webdevops/go-common v0.0.0-20220406110653-237539a358b2
require github.com/webdevops/go-common v0.0.0-20220410190409-7b8e84fab0bf

require (
github.com/beorn7/perks v1.0.1 // indirect
Expand All @@ -23,4 +23,6 @@ require (
github.com/patrickmn/go-cache v2.1.0+incompatible // indirect
github.com/prometheus/client_model v0.2.0 // indirect
github.com/prometheus/procfs v0.7.3 // indirect
github.com/remeh/sizedwaitgroup v1.0.0 // indirect
github.com/robfig/cron v1.2.0 // indirect
)
8 changes: 8 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,10 @@ github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4O
github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA=
github.com/prometheus/procfs v0.7.3 h1:4jVXhlkAyzOScmCkXBTOLRLTz8EeU+eyjrwB/EPq0VU=
github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA=
github.com/remeh/sizedwaitgroup v1.0.0 h1:VNGGFwNo/R5+MJBf6yrsr110p0m4/OX4S3DCy7Kyl5E=
github.com/remeh/sizedwaitgroup v1.0.0/go.mod h1:3j2R4OIe/SeS6YDhICBy22RWjJC5eNCJ1V+9+NVNYlo=
github.com/robfig/cron v1.2.0 h1:ZjScXvvxeQ63Dbyxy76Fj3AT3Ut0aKsyd2/tl3DTMuQ=
github.com/robfig/cron v1.2.0/go.mod h1:JGuDeoQd7Z6yL4zQhZ3OPEVHB7fL6Ka6skscFHfmt2k=
github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo=
github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE=
Expand All @@ -223,6 +227,10 @@ github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJy
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
github.com/webdevops/go-common v0.0.0-20220406110653-237539a358b2 h1:ZK31iWMbk0TkSCof5C8ukGmbJ86HbvN41mJilpROL20=
github.com/webdevops/go-common v0.0.0-20220406110653-237539a358b2/go.mod h1:SqjH91aPqrsvnigkx6+XyuX9TYN7+ymaIcV9OJy5DhA=
github.com/webdevops/go-common v0.0.0-20220410182807-256868d7d7fd h1:f6xZpH6bD3W+sILlVP942jlZNR9cPkMoCe3NKecuX0I=
github.com/webdevops/go-common v0.0.0-20220410182807-256868d7d7fd/go.mod h1:StsDbNavo/7SyvTBMzsqaiTy0rK3wIF1dSJk5vqOaws=
github.com/webdevops/go-common v0.0.0-20220410190409-7b8e84fab0bf h1:BRQKngpSxlV193KCrstZrbNOuS1PVfv5W43UjbapphI=
github.com/webdevops/go-common v0.0.0-20220410190409-7b8e84fab0bf/go.mod h1:StsDbNavo/7SyvTBMzsqaiTy0rK3wIF1dSJk5vqOaws=
github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
Expand Down
Loading

0 comments on commit 42c9daf

Please sign in to comment.