Documentation
¶
Overview ¶
Package Gossip provides a gossip registry based on hashicorp/memberlist
Index ¶
- Variables
- func Address(a string) registry.Option
- func Advertise(a string) registry.Option
- func Config(c *memberlist.Config) registry.Option
- func ConnectRetry(v bool) registry.Option
- func ConnectTimeout(td time.Duration) registry.Option
- func Context(ctx context.Context) registry.Option
- func NewRegistry(opts ...registry.Option) registry.Registry
- func Secret(k []byte) registry.Option
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // You should change this if using secure DefaultSecret = []byte("micro-gossip-key") // exactly 16 bytes ExpiryTick = time.Second * 1 // needs to be smaller than registry.RegisterTTL MaxPacketSize = 512 )
Functions ¶
func Config ¶ added in v0.16.0
func Config(c *memberlist.Config) registry.Option
Config allow to inject a *memberlist.Config struct for configuring gossip
func ConnectRetry ¶ added in v0.26.0
ConnectRetry enable reconnect to registry then connection closed, use with ConnectTimeout to specify how long retry
func ConnectTimeout ¶ added in v0.26.0
ConnectTimeout specify registry connect timeout use -1 to specify infinite
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.