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 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 Advertise ¶ added in v1.4.1
The address to advertise for other gossip members to connect to - host:port
func Config ¶ added in v1.4.1
func Config(c *memberlist.Config) registry.Option
Config sets *memberlist.Config for configuring gossip
func ConnectRetry ¶ added in v1.4.1
ConnectRetry enables reconnect to registry then connection closed, use with ConnectTimeout to specify how long retry
func ConnectTimeout ¶ added in v1.4.1
ConnectTimeout sets the registry connect timeout. Use -1 to specify infinite timeout
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.