cluster

package
v0.0.0-...-d5b6aee Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2017 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Experimental clustering for Dayfile. Really experimental. Not recommended for use.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddDial

func AddDial(n string, f func(addr string) (net.Conn, error))

func AddListen

func AddListen(n string, f func(addr string) (net.Listener, error))

Types

type DayfileNode

type DayfileNode struct {
	ID []byte // Must be 16 bytes.
	// contains filtered or unexported fields
}

type NodeFacade

type NodeFacade struct {
	LocalName string
	LocalNode *NodeInfo
	Handler   *dbrpc.Handler
	Nodes     map[string]*NodeObject
	Dayfile   map[uuid.UUID]*NodeObject
	// contains filtered or unexported fields
}

func (*NodeFacade) GetBroadcasts

func (n *NodeFacade) GetBroadcasts(overhead, limit int) [][]byte

func (*NodeFacade) LocalState

func (n *NodeFacade) LocalState(join bool) []byte

func (*NodeFacade) MergeRemoteState

func (n *NodeFacade) MergeRemoteState(buf []byte, join bool)

func (*NodeFacade) NFInitialize

func (n *NodeFacade) NFInitialize()

func (*NodeFacade) NodeMeta

func (n *NodeFacade) NodeMeta(limit int) []byte

Delegate

func (*NodeFacade) NotifyJoin

func (n *NodeFacade) NotifyJoin(e *memberlist.Node)

func (*NodeFacade) NotifyLeave

func (n *NodeFacade) NotifyLeave(e *memberlist.Node)

func (*NodeFacade) NotifyMsg

func (n *NodeFacade) NotifyMsg([]byte)

func (*NodeFacade) NotifyUpdate

func (n *NodeFacade) NotifyUpdate(e *memberlist.Node)

type NodeInfo

type NodeInfo struct {
	RpcPort     int
	RpcProtocol string // Should be "tcp"
	DayfileNode *DayfileNode
	// contains filtered or unexported fields
}

type NodeObject

type NodeObject struct {
	Info   *NodeInfo
	Client *dbrpc.Client
}

Jump to

Keyboard shortcuts

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