Skip to content

Commit

Permalink
Upgrade modules
Browse files Browse the repository at this point in the history
  • Loading branch information
pedropombeiro committed Jul 30, 2024
1 parent 1d2aac7 commit 775ae1c
Show file tree
Hide file tree
Showing 3 changed files with 123 additions and 87 deletions.
5 changes: 2 additions & 3 deletions docker_events.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
"strings"
"time"

"github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/events"
"github.com/docker/docker/api/types/filters"
"github.com/docker/docker/client"
Expand Down Expand Up @@ -44,7 +43,7 @@ func handleDockerEvents(ctx context.Context, args httpServerArgs, annotator noti
}
case msg := <-msgs:
t := time.Unix(0, msg.TimeNano)
m := strings.Join([]string{msg.Type, msg.Action, msg.Actor.ID, formatDockerActorAttributes(msg.Actor.Attributes)}, " ")
m := strings.Join([]string{string(msg.Type), string(msg.Action), msg.Actor.ID, formatDockerActorAttributes(msg.Actor.Attributes)}, " ")
exporterStatus.Docker = m
args.logger.Printf("%v: %s\n", t, m)
_, _ = annotator.Post(m, t)
Expand All @@ -56,7 +55,7 @@ func handleDockerEvents(ctx context.Context, args httpServerArgs, annotator noti
}

func dockerEvents(ctx context.Context, cli *client.Client, exporterStatus *exporter.Status) (<-chan events.Message, <-chan error) {
opts := types.EventsOptions{
opts := events.ListOptions{
Since: "1h",
Filters: filters.NewArgs(
// Containers
Expand Down
53 changes: 31 additions & 22 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,43 +4,52 @@ module github.com/pedropombeiro/qnapexporter
go 1.21

require (
github.com/docker/docker v24.0.9+incompatible
github.com/docker/docker v27.1.1+incompatible
github.com/dustin/go-humanize v1.0.1
github.com/go-ping/ping v1.1.0
github.com/robbiet480/go.nut v0.0.0-20220219091450-bd8f121e1fa1
github.com/shirou/gopsutil/v3 v3.23.3
github.com/stretchr/testify v1.8.2
github.com/robbiet480/go.nut v0.0.0-20240622015809-60e196249c53
github.com/shirou/gopsutil/v3 v3.24.5
github.com/stretchr/testify v1.9.0
)

require (
github.com/Microsoft/go-winio v0.6.0 // indirect
github.com/Microsoft/go-winio v0.6.2 // indirect
github.com/containerd/log v0.1.0 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/docker/distribution v2.8.2+incompatible // indirect
github.com/docker/go-connections v0.4.0 // indirect
github.com/distribution/reference v0.6.0 // indirect
github.com/docker/go-connections v0.5.0 // indirect
github.com/docker/go-units v0.5.0 // indirect
github.com/go-ole/go-ole v1.2.6 // indirect
github.com/felixge/httpsnoop v1.0.4 // indirect
github.com/go-logr/logr v1.4.2 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/go-ole/go-ole v1.3.0 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/google/uuid v1.3.0 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/kr/pretty v0.1.0 // indirect
github.com/lufia/plan9stats v0.0.0-20230326075908-cb1d2100619a // indirect
github.com/lufia/plan9stats v0.0.0-20240513124658-fba389f38bae // indirect
github.com/moby/docker-image-spec v1.3.1 // indirect
github.com/moby/term v0.0.0-20201216013528-df9cb8a40635 // indirect
github.com/morikuni/aec v1.0.0 // indirect
github.com/opencontainers/go-digest v1.0.0 // indirect
github.com/opencontainers/image-spec v1.1.0-rc2 // indirect
github.com/opencontainers/image-spec v1.1.0 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/power-devops/perfstat v0.0.0-20221212215047-62379fc7944b // indirect
github.com/shoenig/go-m1cpu v0.1.5 // indirect
github.com/stretchr/objx v0.5.0 // indirect
github.com/tklauser/go-sysconf v0.3.11 // indirect
github.com/tklauser/numcpus v0.6.0 // indirect
github.com/yusufpapurcu/wmi v1.2.2 // indirect
golang.org/x/mod v0.10.0 // indirect
golang.org/x/net v0.23.0 // indirect
golang.org/x/sync v0.1.0 // indirect
golang.org/x/sys v0.18.0 // indirect
github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55 // indirect
github.com/shoenig/go-m1cpu v0.1.6 // indirect
github.com/stretchr/objx v0.5.2 // indirect
github.com/tklauser/go-sysconf v0.3.14 // indirect
github.com/tklauser/numcpus v0.8.0 // indirect
github.com/yusufpapurcu/wmi v1.2.4 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.53.0 // indirect
go.opentelemetry.io/otel v1.28.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.28.0 // indirect
go.opentelemetry.io/otel/metric v1.28.0 // indirect
go.opentelemetry.io/otel/sdk v1.28.0 // indirect
go.opentelemetry.io/otel/trace v1.28.0 // indirect
golang.org/x/net v0.27.0 // indirect
golang.org/x/sync v0.7.0 // indirect
golang.org/x/sys v0.22.0 // indirect
golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac // indirect
golang.org/x/tools v0.8.0 // indirect
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
gotest.tools/v3 v3.0.3 // indirect
Expand Down
Loading

0 comments on commit 775ae1c

Please sign in to comment.