Initial version
Project structure, api, discovery service, docker.
This commit is contained in:
19
pkg/discovery/options.go
Normal file
19
pkg/discovery/options.go
Normal 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
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user