micro/registry/gossip
Vasiliy Tolstov f961c571bd registry: [gossip] fix panic
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x88 pc=0xd1b215]

goroutine 8 [running]:
sync.(*RWMutex).RLock(...)
        /var/home/vtolstov/sdk/go1.12beta2/src/sync/rwmutex.go:48
github.com/hashicorp/memberlist.(*Memberlist).LocalNode(0x0, 0x0)
        /home/vtolstov/devel/projects/centralv2/vendor/github.com/hashicorp/memberlist/memberlist.go:417 +0x35
github.com/micro/go-micro/registry/gossip.(*gossipRegistry).run.func3(0xc000155880)
        /home/vtolstov/devel/projects/centralv2/vendor/github.com/micro/go-micro/registry/gossip/gossip.go:565 +0xf5
created by github.com/micro/go-micro/registry/gossip.(*gossipRegistry).run
        /home/vtolstov/devel/projects/centralv2/vendor/github.com/micro/go-micro/registry/gossip/gossip.go:553 +0xa25

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2019-02-13 16:36:38 +03:00
..
proto registry: gossip unify registry option passing, optimize 2019-02-02 01:12:39 +03:00
context.go registry: gossip unify registry option passing, optimize 2019-02-02 01:12:39 +03:00
gossip_test.go registry: [gossip] add ConnectRetry and ConnectTimeout 2019-02-12 17:16:35 +03:00
gossip.go registry: [gossip] fix panic 2019-02-13 16:36:38 +03:00
options.go registry: [gossip] add ConnectRetry and ConnectTimeout 2019-02-12 17:16:35 +03:00
README.md registry: gossip unify registry option passing, optimize 2019-02-02 01:12:39 +03:00
util_test.go gossip registry 2018-12-04 16:41:40 +00:00
util.go fix nil pointer 2019-02-01 16:01:51 +00:00
watcher.go update the gossiper 2018-12-06 18:19:05 +00:00

Gossip Registry

Gossip is a zero dependency registry which uses github.com/hashicorp/memberlist to broadcast registry information via the SWIM protocol.

Usage

Start with the registry flag or env var

MICRO_REGISTRY=gossip go run service.go

On startup you'll see something like

2018/12/06 18:17:48 Registry Listening on 192.168.1.65:56390

To join this gossip ring set the registry address using flag or env var

MICRO_REGISTRY_ADDRESS=192.168.1.65:56390