-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathurkel.pb.go
253 lines (218 loc) · 8.13 KB
/
urkel.pb.go
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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: urkel.proto
package urkel
import (
context "context"
fmt "fmt"
proto "github.com/gogo/protobuf/proto"
empty "github.com/golang/protobuf/ptypes/empty"
grpc "google.golang.org/grpc"
math "math"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
// Partition traffic flows of a specific interface from a source IP range,
// using the given mode (either REJECT or DROP).
type Partition struct {
// Index of the interface to partition. Can be determined by
// querying "/sys/class/net/eth0/iflink" within the target container.
InterfaceIndex string `protobuf:"bytes,1,opt,name=interface_index,json=interfaceIndex,proto3" json:"interface_index,omitempty"`
// Network IP range to partition from (eg "1.2.3.4/16").
FromIpRange string `protobuf:"bytes,2,opt,name=from_ip_range,json=fromIpRange,proto3" json:"from_ip_range,omitempty"`
// Partition mode. REJECT to actively reset connections, DROP to silently
// drop packet flows.
Mode string `protobuf:"bytes,3,opt,name=mode,proto3" json:"mode,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Partition) Reset() { *m = Partition{} }
func (m *Partition) String() string { return proto.CompactTextString(m) }
func (*Partition) ProtoMessage() {}
func (*Partition) Descriptor() ([]byte, []int) {
return fileDescriptor_e06a00d1477a6245, []int{0}
}
func (m *Partition) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Partition.Unmarshal(m, b)
}
func (m *Partition) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Partition.Marshal(b, m, deterministic)
}
func (m *Partition) XXX_Merge(src proto.Message) {
xxx_messageInfo_Partition.Merge(m, src)
}
func (m *Partition) XXX_Size() int {
return xxx_messageInfo_Partition.Size(m)
}
func (m *Partition) XXX_DiscardUnknown() {
xxx_messageInfo_Partition.DiscardUnknown(m)
}
var xxx_messageInfo_Partition proto.InternalMessageInfo
func (m *Partition) GetInterfaceIndex() string {
if m != nil {
return m.InterfaceIndex
}
return ""
}
func (m *Partition) GetFromIpRange() string {
if m != nil {
return m.FromIpRange
}
return ""
}
func (m *Partition) GetMode() string {
if m != nil {
return m.Mode
}
return ""
}
// Fault is a union type indicating the variety of Fault to be applied.
type Fault struct {
Partition *Partition `protobuf:"bytes,1,opt,name=partition,proto3" json:"partition,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Fault) Reset() { *m = Fault{} }
func (m *Fault) String() string { return proto.CompactTextString(m) }
func (*Fault) ProtoMessage() {}
func (*Fault) Descriptor() ([]byte, []int) {
return fileDescriptor_e06a00d1477a6245, []int{1}
}
func (m *Fault) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Fault.Unmarshal(m, b)
}
func (m *Fault) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Fault.Marshal(b, m, deterministic)
}
func (m *Fault) XXX_Merge(src proto.Message) {
xxx_messageInfo_Fault.Merge(m, src)
}
func (m *Fault) XXX_Size() int {
return xxx_messageInfo_Fault.Size(m)
}
func (m *Fault) XXX_DiscardUnknown() {
xxx_messageInfo_Fault.DiscardUnknown(m)
}
var xxx_messageInfo_Fault proto.InternalMessageInfo
func (m *Fault) GetPartition() *Partition {
if m != nil {
return m.Partition
}
return nil
}
func init() {
proto.RegisterType((*Partition)(nil), "urkel.Partition")
proto.RegisterType((*Fault)(nil), "urkel.Fault")
}
func init() { proto.RegisterFile("urkel.proto", fileDescriptor_e06a00d1477a6245) }
var fileDescriptor_e06a00d1477a6245 = []byte{
// 224 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x44, 0x8f, 0x4f, 0x4b, 0xc4, 0x30,
0x14, 0xc4, 0xa9, 0x5a, 0xa1, 0xaf, 0xfe, 0x23, 0x07, 0x29, 0xeb, 0x45, 0x7a, 0x71, 0x4f, 0x59,
0x59, 0x0f, 0x7b, 0x15, 0x44, 0xa1, 0x37, 0xe9, 0x17, 0x28, 0xd9, 0xdd, 0xd7, 0x1a, 0x4d, 0xf3,
0x42, 0x4c, 0x41, 0xbf, 0xbd, 0xe4, 0xc5, 0xed, 0xde, 0x32, 0xbf, 0x4c, 0x32, 0x33, 0x50, 0x4e,
0xfe, 0x0b, 0x8d, 0x74, 0x9e, 0x02, 0x89, 0x9c, 0xc5, 0xe2, 0x6e, 0x20, 0x1a, 0x0c, 0xae, 0x18,
0x6e, 0xa7, 0x7e, 0x85, 0xa3, 0x0b, 0xbf, 0xc9, 0x53, 0x1b, 0x28, 0xde, 0x95, 0x0f, 0x3a, 0x68,
0xb2, 0xe2, 0x01, 0xae, 0xb5, 0x0d, 0xe8, 0x7b, 0xb5, 0xc3, 0x4e, 0xdb, 0x3d, 0xfe, 0x54, 0xd9,
0x7d, 0xb6, 0x2c, 0xda, 0xab, 0x19, 0x37, 0x91, 0x8a, 0x1a, 0x2e, 0x7b, 0x4f, 0x63, 0xa7, 0x5d,
0xe7, 0x95, 0x1d, 0xb0, 0x3a, 0x61, 0x5b, 0x19, 0x61, 0xe3, 0xda, 0x88, 0x84, 0x80, 0xb3, 0x91,
0xf6, 0x58, 0x9d, 0xf2, 0x15, 0x9f, 0xeb, 0x0d, 0xe4, 0x6f, 0x6a, 0x32, 0x41, 0x48, 0x28, 0xdc,
0x21, 0x96, 0x33, 0xca, 0xf5, 0x8d, 0x4c, 0xdd, 0xe7, 0x3a, 0xed, 0xd1, 0xb2, 0x7e, 0x86, 0xfc,
0xe5, 0x43, 0xd1, 0xb7, 0xd8, 0x40, 0xd9, 0xd8, 0x4f, 0xdc, 0x85, 0xf4, 0xcf, 0xc5, 0xff, 0x23,
0x56, 0x8b, 0x5b, 0x99, 0xa6, 0xca, 0xc3, 0x54, 0xf9, 0x1a, 0xa7, 0x2e, 0xb3, 0xc7, 0x6c, 0x7b,
0xce, 0xec, 0xe9, 0x2f, 0x00, 0x00, 0xff, 0xff, 0x7e, 0xdf, 0xcc, 0x81, 0x22, 0x01, 0x00, 0x00,
}
// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConn
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion4
// ChaosClient is the client API for Chaos service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type ChaosClient interface {
InjectFault(ctx context.Context, opts ...grpc.CallOption) (Chaos_InjectFaultClient, error)
}
type chaosClient struct {
cc *grpc.ClientConn
}
func NewChaosClient(cc *grpc.ClientConn) ChaosClient {
return &chaosClient{cc}
}
func (c *chaosClient) InjectFault(ctx context.Context, opts ...grpc.CallOption) (Chaos_InjectFaultClient, error) {
stream, err := c.cc.NewStream(ctx, &_Chaos_serviceDesc.Streams[0], "/urkel.Chaos/InjectFault", opts...)
if err != nil {
return nil, err
}
x := &chaosInjectFaultClient{stream}
return x, nil
}
type Chaos_InjectFaultClient interface {
Send(*Fault) error
Recv() (*empty.Empty, error)
grpc.ClientStream
}
type chaosInjectFaultClient struct {
grpc.ClientStream
}
func (x *chaosInjectFaultClient) Send(m *Fault) error {
return x.ClientStream.SendMsg(m)
}
func (x *chaosInjectFaultClient) Recv() (*empty.Empty, error) {
m := new(empty.Empty)
if err := x.ClientStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
// ChaosServer is the server API for Chaos service.
type ChaosServer interface {
InjectFault(Chaos_InjectFaultServer) error
}
func RegisterChaosServer(s *grpc.Server, srv ChaosServer) {
s.RegisterService(&_Chaos_serviceDesc, srv)
}
func _Chaos_InjectFault_Handler(srv interface{}, stream grpc.ServerStream) error {
return srv.(ChaosServer).InjectFault(&chaosInjectFaultServer{stream})
}
type Chaos_InjectFaultServer interface {
Send(*empty.Empty) error
Recv() (*Fault, error)
grpc.ServerStream
}
type chaosInjectFaultServer struct {
grpc.ServerStream
}
func (x *chaosInjectFaultServer) Send(m *empty.Empty) error {
return x.ServerStream.SendMsg(m)
}
func (x *chaosInjectFaultServer) Recv() (*Fault, error) {
m := new(Fault)
if err := x.ServerStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
var _Chaos_serviceDesc = grpc.ServiceDesc{
ServiceName: "urkel.Chaos",
HandlerType: (*ChaosServer)(nil),
Methods: []grpc.MethodDesc{},
Streams: []grpc.StreamDesc{
{
StreamName: "InjectFault",
Handler: _Chaos_InjectFault_Handler,
ServerStreams: true,
ClientStreams: true,
},
},
Metadata: "urkel.proto",
}