mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-05-24 00:21:20 +00:00
Instead of relying on `protoc` and buildscripts, we generate the bindings using `pb-rs` and version them within our codebase. This makes for a better IDE integration, a faster build and an easier use of `rust-libp2p` because we don't force the `protoc` dependency onto them. Resolves #3024. Pull-Request: #3312.
38 lines
670 B
Protocol Buffer
38 lines
670 B
Protocol Buffer
syntax = "proto2";
|
|
|
|
package structs;
|
|
|
|
message Message {
|
|
enum MessageType {
|
|
DIAL = 0;
|
|
DIAL_RESPONSE = 1;
|
|
}
|
|
|
|
enum ResponseStatus {
|
|
OK = 0;
|
|
E_DIAL_ERROR = 100;
|
|
E_DIAL_REFUSED = 101;
|
|
E_BAD_REQUEST = 200;
|
|
E_INTERNAL_ERROR = 300;
|
|
}
|
|
|
|
message PeerInfo {
|
|
optional bytes id = 1;
|
|
repeated bytes addrs = 2;
|
|
}
|
|
|
|
message Dial {
|
|
optional PeerInfo peer = 1;
|
|
}
|
|
|
|
message DialResponse {
|
|
optional ResponseStatus status = 1;
|
|
optional string statusText = 2;
|
|
optional bytes addr = 3;
|
|
}
|
|
|
|
optional MessageType type = 1;
|
|
optional Dial dial = 2;
|
|
optional DialResponse dialResponse = 3;
|
|
}
|