Documentation ¶
Overview ¶
Defines the structure for the Request and Response messages.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RequestMessage ¶
type RequestMessage struct { Type string // PING | SYNC | FIND_SUCCESSOR | CLOSEST_PRECEDING_NODE | PUT TargetId uint64 // ID of the parameter node passed to the destination IP string // IP of the parameter node passed to the destination Payload map[uint64][]string HopCount int }
Sample message structure. To be replaced with a struct for protobuff
func (*RequestMessage) PrintContent ¶
func (msg *RequestMessage) PrintContent()
***************************************
UTILITY FUNCTIONS
***************************************
Message utility function to print the request message
type ResponseMessage ¶
type ResponseMessage struct { Type string // PING | SYNC | ACK | FIND_SUCCESSOR | CLOSEST_PRECEDING_NODE Nodeid uint64 // ID of the node in the response message IP string // IP of the node in the response message QueryResponse []string Payload map[uint64][]string }
func (*ResponseMessage) PrintContent ¶
func (msg *ResponseMessage) PrintContent()
Message utility function to print the response message
Click to show internal directories.
Click to hide internal directories.