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 ¶
Exported methods ------------------------------------------------------
Types ¶
type Message ¶
type Message struct { TypeOfMsg MessageType Origin shared.DistantNode Destination shared.DistantNode Parameters map[string]string }
func UnmarshallMessage ¶
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
Click to show internal directories.
Click to hide internal directories.