Created
July 29, 2014 18:12
-
-
Save whyrusleeping/4717c758245df5bf8948 to your computer and use it in GitHub Desktop.
protobuf message type for dht messages
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package dht; | |
//run `protoc --go_out=. *.proto` to generate | |
message DHTMessage { | |
enum MessageType { | |
PUT_VALUE = 0; | |
GET_VALUE = 1; | |
PING = 2; | |
FIND_NODE = 3; | |
} | |
required MessageType type = 1; | |
optional string key = 2; | |
optional bytes value = 3; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Ive updated my type to reflect this and will be pushing it soon.