go-micro: github.com/micro/go-micro/registry/gossip Index | Files | Directories

package gossip

import "github.com/micro/go-micro/registry/gossip"

Package gossip provides a gossip registry based on hashicorp/memberlist

Index

Package Files

gossip.go options.go watcher.go

Variables

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
)

func Address Uses

func Address(a string) registry.Option

Address to bind to - host:port

func Advertise(a string) registry.Option

The address to advertise for other gossip members to connect to - host:port

func Config Uses

func Config(c *memberlist.Config) registry.Option

Config sets *memberlist.Config for configuring gossip

func ConnectRetry Uses

func ConnectRetry(v bool) registry.Option

ConnectRetry enables reconnect to registry then connection closed, use with ConnectTimeout to specify how long retry

func ConnectTimeout Uses

func ConnectTimeout(td time.Duration) registry.Option

ConnectTimeout sets the registry connect timeout. Use -1 to specify infinite timeout

func NewRegistry Uses

func NewRegistry(opts ...registry.Option) registry.Registry

func Secret Uses

func Secret(k []byte) registry.Option

Secret specifies an encryption key. The value should be either 16, 24, or 32 bytes to select AES-128, AES-192, or AES-256.

Directories

PathSynopsis
protoPackage gossip is a generated protocol buffer package.

Package gossip imports 17 packages (graph) and is imported by 6 packages. Updated 2019-07-05. Refresh now. Tools for package owners.