messages.proto 256 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
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;
}