Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
mkuratczyk committed Nov 19, 2024
1 parent 12d1216 commit 3bca8d1
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
3 changes: 2 additions & 1 deletion cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -276,13 +276,14 @@ func start(cfg config.Config) {
os.Exit(1)
}

log.Info("waiting for peers", "expected-instances", cfg.ExpectedInstances)
discoveries, _ := peerdiscovery.Discover(peerdiscovery.Settings{
Limit: cfg.ExpectedInstances - 1,
TimeLimit: 1 * time.Hour,
// Payload
// Notify
})
log.Info("discovered the expected number of peers", "expected-instance", len(discoveries))
log.Info("discovered the expected number of peers", "peers found", len(discoveries))
ctx, cancel := context.WithCancel(context.Background())
defer cancel()

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ require (
github.com/onsi/ginkgo/v2 v2.20.2
github.com/onsi/gomega v1.34.2
github.com/relvacode/iso8601 v1.5.0
github.com/schollz/peerdiscovery v1.7.5
github.com/spf13/cobra v1.8.1
github.com/thediveo/enumflag/v2 v2.0.5
)
Expand All @@ -38,7 +39,6 @@ require (
github.com/onsi/ginkgo v1.16.5 // indirect
github.com/rivo/uniseg v0.4.7 // indirect
github.com/rogpeppe/go-internal v1.11.0 // indirect
github.com/schollz/peerdiscovery v1.7.5 // indirect
github.com/streadway/amqp v1.1.0 // indirect
github.com/valyala/fastrand v1.1.0 // indirect
github.com/valyala/histogram v1.2.0 // indirect
Expand Down
2 changes: 0 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,6 @@ github.com/orisano/pixelmatch v0.0.0-20220722002657-fb0b55479cde/go.mod h1:nZgzb
github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/rabbitmq/rabbitmq-amqp-go-client v0.0.0-20241001222512-5fc29f4968d0 h1:aX62gNFKXqBsacs3ejwl21dfyP8GT8WUPX04cRuLzwQ=
github.com/rabbitmq/rabbitmq-amqp-go-client v0.0.0-20241001222512-5fc29f4968d0/go.mod h1:Km231GyOZAw9I3SZIqkfB9VVzCsu8jvFWYdghmnwueM=
github.com/rabbitmq/rabbitmq-amqp-go-client v0.0.0-20241115073728-60e006b2a387 h1:KgGLTkwWhaJLlT90qARw3VPBR0urCiH2ZZh2yAz80t0=
github.com/rabbitmq/rabbitmq-amqp-go-client v0.0.0-20241115073728-60e006b2a387/go.mod h1:Km231GyOZAw9I3SZIqkfB9VVzCsu8jvFWYdghmnwueM=
github.com/relvacode/iso8601 v1.5.0 h1:hM+cirGvOz6gKuUEqimr5TH3tiQiVOuc2QIO+nI5fY4=
Expand Down

0 comments on commit 3bca8d1

Please sign in to comment.