gossip

package
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 20, 2017 License: Apache-2.0 Imports: 13 Imported by: 1

README

Gossip Registry

Gossip is a registry plugin for go-micro which uses hashicorp/memberlist to broadcast registry information via the SWIM protocol.

Usage

Import the plugin as per usual

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

Start with the registry flag

go run service.go --registry=gossip

On startup you'll see something like

2016/06/19 14:05:43 Local memberlist node 127.0.0.1:45465

To join this gossip ring use --registry=gossip --registry_address 127.0.0.1:45465 when starting other nodes

Documentation

Overview

Package Gossip provides a gossip registry based on hashicorp/memberlist

Index

Constants

This section is empty.

Variables

View Source
var (
	// You should change this if using secure
	DefaultKey = []byte("gossipKey")
	ExpiryTick = time.Second * 10
)

Functions

func NewRegistry

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

func SecretKey

func SecretKey(k []byte) registry.Option

Types

This section is empty.

Directories

Path Synopsis
module

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL