Skip to content

Instantly share code, notes, and snippets.

@whyrusleeping
Created July 29, 2014 18:12
Show Gist options
  • Save whyrusleeping/4717c758245df5bf8948 to your computer and use it in GitHub Desktop.
Save whyrusleeping/4717c758245df5bf8948 to your computer and use it in GitHub Desktop.
protobuf message type for dht messages
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;
}
@whyrusleeping
Copy link
Author

Ive updated my type to reflect this and will be pushing it soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment