communicator

package
v0.0.0-...-405f43c Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2014 License: MIT Imports: 4 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var PendingGetData = make(map[string]chan string)
View Source
var PendingGetSucc = make(map[string]chan shared.DistantNode)
View Source
var PendingHearBeat = make(map[string]chan shared.DistantNode)
View Source
var PendingLookups = make(map[string]chan shared.DistantNode)

Global variable -------------------------------------------------------

Functions

func GenerateId

func GenerateId() string

func MarshallMessage

func MarshallMessage(msg *Message) []byte

Exported methods ------------------------------------------------------

Types

type Message

type Message struct {
	TypeOfMsg   MessageType
	Origin      shared.DistantNode
	Destination shared.DistantNode
	Parameters  map[string]string
}

func UnmarshallMessage

func UnmarshallMessage(buffer []byte) Message

type MessageType

type MessageType int

Const parts -----------------------------------------------------------

const (
	LOOKUP               MessageType = iota + 1 //1
	LOOKUPRESPONSE                              //2
	UPDATESUCCESSOR                             //3
	UPDATEPREDECESSOR                           //4
	PRINTRING                                   //5
	JOINRING                                    //6
	UPDATEFINGERTABLE                           //7
	AREYOUALIVE                                 //8
	IAMALIVE                                    //9
	GETSUCCESORE                                //10
	GETSUCCESORERESPONSE                        //11
	GETDATA                                     //12
	GETDATARESPONSE                             //13
	SETDATA                                     //14
	DELETEDATA                                  //15
)

func (MessageType) String

func (mt MessageType) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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