Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fix proto file and generated code #94

Merged
merged 3 commits into from
Sep 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 18 additions & 17 deletions packages/libp2p-daemon-protocol/src/index.proto
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ message Request {
PEERSTORE = 9;
}

required Type type = 1;
Type type = 1;

optional ConnectRequest connect = 2;
optional StreamOpenRequest streamOpen = 3;
Expand All @@ -32,7 +32,7 @@ message Response {
ERROR = 1;
}

required Type type = 1;
Type type = 1;
optional ErrorResponse error = 2;
optional StreamInfo streamInfo = 3;
optional IdentifyResponse identify = 4;
Expand All @@ -43,35 +43,35 @@ message Response {
}

message IdentifyResponse {
required bytes id = 1;
bytes id = 1;
repeated bytes addrs = 2;
}

message ConnectRequest {
required bytes peer = 1;
bytes peer = 1;
repeated bytes addrs = 2;
optional int64 timeout = 3;
}

message StreamOpenRequest {
required bytes peer = 1;
bytes peer = 1;
repeated string proto = 2;
optional int64 timeout = 3;
}

message StreamHandlerRequest {
required bytes addr = 1;
bytes addr = 1;
repeated string proto = 2;
}

message ErrorResponse {
required string msg = 1;
string msg = 1;
}

message StreamInfo {
required bytes peer = 1;
required bytes addr = 2;
required string proto = 3;
bytes peer = 1;
bytes addr = 2;
string proto = 3;
}

message DHTRequest {
Expand All @@ -87,7 +87,7 @@ message DHTRequest {
PROVIDE = 8;
}

required Type type = 1;
Type type = 1;
optional bytes peer = 2;
optional bytes cid = 3;
optional bytes key = 4;
Expand All @@ -103,13 +103,13 @@ message DHTResponse {
END = 2;
}

required Type type = 1;
Type type = 1;
optional PeerInfo peer = 2;
optional bytes value = 3;
}

message PeerInfo {
required bytes id = 1;
bytes id = 1;
repeated bytes addrs = 2;
}

Expand All @@ -120,15 +120,15 @@ message ConnManagerRequest {
TRIM = 2;
}

required Type type = 1;
Type type = 1;

optional bytes peer = 2;
optional string tag = 3;
optional int64 weight = 4;
}

message DisconnectRequest {
required bytes peer = 1;
bytes peer = 1;
}

message PSRequest {
Expand All @@ -139,7 +139,7 @@ message PSRequest {
SUBSCRIBE = 3;
}

required Type type = 1;
Type type = 1;
optional string topic = 2;
optional bytes data = 3;
}
Expand All @@ -160,11 +160,12 @@ message PSResponse {

message PeerstoreRequest {
enum Type {
UNSPECIFIED = 0;
GET_PROTOCOLS = 1;
GET_PEER_INFO = 2;
}

required Type type = 1;
Type type = 1;
optional bytes id = 2;
repeated string protos = 3;
}
Expand Down
Loading