1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
// @generated
// This file is @generated by prost-build.
/// Packet is a message sent over a srpc packet connection.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct Packet {
/// Body is the packet body.
#[prost(oneof="packet::Body", tags="1, 2, 3")]
pub body: ::core::option::Option<packet::Body>,
}
/// Nested message and enum types in `Packet`.
pub mod packet {
/// Body is the packet body.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
pub enum Body {
/// CallStart initiates a new call.
#[prost(message, tag="1")]
CallStart(super::CallStart),
/// CallData is a message in a streaming RPC sequence.
#[prost(message, tag="2")]
CallData(super::CallData),
/// CallCancel cancels the call.
#[prost(bool, tag="3")]
CallCancel(bool),
}
}
/// CallStart requests starting a new RPC call.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CallStart {
/// RpcService is the service to contact.
/// Must be set.
#[prost(string, tag="1")]
pub rpc_service: ::prost::alloc::string::String,
/// RpcMethod is the RPC method to call.
/// Must be set.
#[prost(string, tag="2")]
pub rpc_method: ::prost::alloc::string::String,
/// Data contains the request or the first message in the stream.
/// Optional if streaming.
#[prost(bytes="vec", tag="3")]
pub data: ::prost::alloc::vec::Vec<u8>,
/// DataIsZero indicates Data is set with an empty message.
#[prost(bool, tag="4")]
pub data_is_zero: bool,
}
/// CallData contains a message in a streaming RPC sequence.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CallData {
/// Data contains the packet in the sequence.
#[prost(bytes="vec", tag="1")]
pub data: ::prost::alloc::vec::Vec<u8>,
/// DataIsZero indicates Data is set with an empty message.
#[prost(bool, tag="2")]
pub data_is_zero: bool,
/// Complete indicates the RPC call is completed.
#[prost(bool, tag="3")]
pub complete: bool,
/// Error contains any error that caused the RPC to fail.
/// If set, implies complete=true.
#[prost(string, tag="4")]
pub error: ::prost::alloc::string::String,
}
/// TerminalKind is the terminal state of a held unary invocation.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum TerminalKind {
/// TERMINAL_KIND_UNSPECIFIED is not a valid terminal state.
Unspecified = 0,
/// TERMINAL_KIND_COMMITTED identifies an explicit remote CallData completion.
Committed = 1,
/// TERMINAL_KIND_CANCELED identifies a remote CallCancel packet.
Canceled = 2,
/// TERMINAL_KIND_TRANSPORT_LOST identifies a remote error or transport failure.
TransportLost = 3,
/// TERMINAL_KIND_CLOSED identifies a bare remote close without completion.
Closed = 4,
/// TERMINAL_KIND_ABANDONED identifies owner-context expiry without a remote terminal.
Abandoned = 5,
}
impl TerminalKind {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "TERMINAL_KIND_UNSPECIFIED",
Self::Committed => "TERMINAL_KIND_COMMITTED",
Self::Canceled => "TERMINAL_KIND_CANCELED",
Self::TransportLost => "TERMINAL_KIND_TRANSPORT_LOST",
Self::Closed => "TERMINAL_KIND_CLOSED",
Self::Abandoned => "TERMINAL_KIND_ABANDONED",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"TERMINAL_KIND_UNSPECIFIED" => Some(Self::Unspecified),
"TERMINAL_KIND_COMMITTED" => Some(Self::Committed),
"TERMINAL_KIND_CANCELED" => Some(Self::Canceled),
"TERMINAL_KIND_TRANSPORT_LOST" => Some(Self::TransportLost),
"TERMINAL_KIND_CLOSED" => Some(Self::Closed),
"TERMINAL_KIND_ABANDONED" => Some(Self::Abandoned),
_ => None,
}
}
}
// @@protoc_insertion_point(module)