master

package
v0.0.0-...-bc5e729 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2017 License: MPL-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Default = New(defaultAddr)

Default returns a new Master with the default addr

Functions

This section is empty.

Types

type JoinParam

type JoinParam struct {
	HTTPAddr string `json:"httpAddr"`
	NodeAddr string `json:"nodeAddr"`
}

type Master

type Master struct {
	// runtime data
	sync.RWMutex
	// contains filtered or unexported fields
}

Master for a group of caching nodes

func New

func New(addr string) *Master

New returns a new Master with the addr

func (*Master) JoinNode

func (m *Master) JoinNode(args *JoinParam, reply *PeerParam) error

func (*Master) Peers

func (m *Master) Peers() ([]string, error)

Peers returns the httpAddrs

func (*Master) Start

func (m *Master) Start()

Start starts the master listening on addr

type PeerParam

type PeerParam struct {
	Peers []string `json:"peers"`
	DBs   []string `json:"dbs"`
}

Jump to

Keyboard shortcuts

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