Merge pull request #94 from libp2p/feat/protobuf

update gogo protobuf
This commit is contained in:
Steven Allen 2018-08-09 01:10:56 +00:00 committed by GitHub
commit 528779af81
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 2565 additions and 72 deletions

View File

@ -1 +1 @@
0.9.21: QmXScvRbYh9X9okLuX9YMnz1HR4WgRTU2hocjBs15nmCNG 0.9.22: QmcN7km1DxmVmhWPc6qhchpzo1PyhdpLRPmWrcQHcee9ps

View File

@ -7,12 +7,6 @@
"dvcsimport": "github.com/libp2p/go-floodsub" "dvcsimport": "github.com/libp2p/go-floodsub"
}, },
"gxDependencies": [ "gxDependencies": [
{
"author": "whyrusleeping",
"hash": "QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV",
"name": "gogo-protobuf",
"version": "0.0.0"
},
{ {
"author": "whyrusleeping", "author": "whyrusleeping",
"hash": "QmYftoT56eEfUBTD3erR6heXuPSUhGRezSmhSU8LeczP8b", "hash": "QmYftoT56eEfUBTD3erR6heXuPSUhGRezSmhSU8LeczP8b",
@ -65,6 +59,12 @@
"hash": "QmemVjhp1UuWPQqrWSvPcaqH3QJRMjMqNm4T2RULMkDDQe", "hash": "QmemVjhp1UuWPQqrWSvPcaqH3QJRMjMqNm4T2RULMkDDQe",
"name": "go-libp2p-swarm", "name": "go-libp2p-swarm",
"version": "3.0.6" "version": "3.0.6"
},
{
"author": "whyrusleeping",
"hash": "QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8",
"name": "gogo-protobuf",
"version": "0.0.0"
} }
], ],
"gxVersion": "0.9.0", "gxVersion": "0.9.0",
@ -72,6 +72,6 @@
"license": "", "license": "",
"name": "go-libp2p-floodsub", "name": "go-libp2p-floodsub",
"releaseCmd": "git commit -a -m \"gx publish $VERSION\"", "releaseCmd": "git commit -a -m \"gx publish $VERSION\"",
"version": "0.9.21" "version": "0.9.22"
} }

11
pb/Makefile Normal file
View File

@ -0,0 +1,11 @@
PB = $(wildcard *.proto)
GO = $(PB:.proto=.pb.go)
all: $(GO)
%.pb.go: %.proto
protoc --proto_path=$(GOPATH)/src:. --gogofast_out=. $<
clean:
rm -f *.pb.go
rm -f *.go

File diff suppressed because it is too large Load Diff

View File

@ -11,7 +11,7 @@ message RPC {
optional string topicid = 2; optional string topicid = 2;
} }
optional ControlMessage control = 3; optional ControlMessage control = 3;
} }
message Message { message Message {
@ -22,27 +22,27 @@ message Message {
} }
message ControlMessage { message ControlMessage {
repeated ControlIHave ihave = 1; repeated ControlIHave ihave = 1;
repeated ControlIWant iwant = 2; repeated ControlIWant iwant = 2;
repeated ControlGraft graft = 3; repeated ControlGraft graft = 3;
repeated ControlPrune prune = 4; repeated ControlPrune prune = 4;
} }
message ControlIHave { message ControlIHave {
optional string topicID = 1; optional string topicID = 1;
repeated string messageIDs = 2; repeated string messageIDs = 2;
} }
message ControlIWant { message ControlIWant {
repeated string messageIDs = 1; repeated string messageIDs = 1;
} }
message ControlGraft { message ControlGraft {
optional string topicID = 1; optional string topicID = 1;
} }
message ControlPrune { message ControlPrune {
optional string topicID = 1; optional string topicID = 1;
} }
// topicID = hash(topicDescriptor); (not the topic.name) // topicID = hash(topicDescriptor); (not the topic.name)