Initial version

Project structure, api, discovery service, docker.
This commit is contained in:
2023-12-06 08:29:05 +03:00
commit 7864272baa
19 changed files with 896 additions and 0 deletions

19
pkg/discovery/options.go Normal file
View File

@@ -0,0 +1,19 @@
package discovery
import (
"time"
)
type Option func(*Discovery)
func WithBroadcastInterval(v time.Duration) Option {
return func(discovery *Discovery) {
discovery.broadcastInterval = v
}
}
func WithDebug() Option {
return func(discovery *Discovery) {
discovery.debug = true
}
}