/
controller.pb.go
286 lines (246 loc) · 11.6 KB
/
controller.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
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: controller.proto
/*
Package policy is a generated protocol buffer package.
It is generated from these files:
controller.proto
It has these top-level messages:
SetRequest
SetResponse
ResetRequest
ResetResponse
GetReportsRequest
GetReportsResponse
*/
package policy
import proto "github.com/gogo/protobuf/proto"
import fmt "fmt"
import math "math"
import google_protobuf "github.com/golang/protobuf/ptypes/any"
import context "golang.org/x/net/context"
import grpc "google.golang.org/grpc"
// 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
type SetRequest struct {
// The settings to set on the service.
Settings map[string]string `protobuf:"bytes,1,rep,name=settings" json:"settings,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
}
func (m *SetRequest) Reset() { *m = SetRequest{} }
func (m *SetRequest) String() string { return proto.CompactTextString(m) }
func (*SetRequest) ProtoMessage() {}
func (*SetRequest) Descriptor() ([]byte, []int) { return fileDescriptorController, []int{0} }
func (m *SetRequest) GetSettings() map[string]string {
if m != nil {
return m.Settings
}
return nil
}
type SetResponse struct {
}
func (m *SetResponse) Reset() { *m = SetResponse{} }
func (m *SetResponse) String() string { return proto.CompactTextString(m) }
func (*SetResponse) ProtoMessage() {}
func (*SetResponse) Descriptor() ([]byte, []int) { return fileDescriptorController, []int{1} }
type ResetRequest struct {
}
func (m *ResetRequest) Reset() { *m = ResetRequest{} }
func (m *ResetRequest) String() string { return proto.CompactTextString(m) }
func (*ResetRequest) ProtoMessage() {}
func (*ResetRequest) Descriptor() ([]byte, []int) { return fileDescriptorController, []int{2} }
type ResetResponse struct {
}
func (m *ResetResponse) Reset() { *m = ResetResponse{} }
func (m *ResetResponse) String() string { return proto.CompactTextString(m) }
func (*ResetResponse) ProtoMessage() {}
func (*ResetResponse) Descriptor() ([]byte, []int) { return fileDescriptorController, []int{3} }
type GetReportsRequest struct {
}
func (m *GetReportsRequest) Reset() { *m = GetReportsRequest{} }
func (m *GetReportsRequest) String() string { return proto.CompactTextString(m) }
func (*GetReportsRequest) ProtoMessage() {}
func (*GetReportsRequest) Descriptor() ([]byte, []int) { return fileDescriptorController, []int{4} }
type GetReportsResponse struct {
Instances []*google_protobuf.Any `protobuf:"bytes,1,rep,name=instances" json:"instances,omitempty"`
}
func (m *GetReportsResponse) Reset() { *m = GetReportsResponse{} }
func (m *GetReportsResponse) String() string { return proto.CompactTextString(m) }
func (*GetReportsResponse) ProtoMessage() {}
func (*GetReportsResponse) Descriptor() ([]byte, []int) { return fileDescriptorController, []int{5} }
func (m *GetReportsResponse) GetInstances() []*google_protobuf.Any {
if m != nil {
return m.Instances
}
return nil
}
func init() {
proto.RegisterType((*SetRequest)(nil), "istio.testing.mixer.policybackend.SetRequest")
proto.RegisterType((*SetResponse)(nil), "istio.testing.mixer.policybackend.SetResponse")
proto.RegisterType((*ResetRequest)(nil), "istio.testing.mixer.policybackend.ResetRequest")
proto.RegisterType((*ResetResponse)(nil), "istio.testing.mixer.policybackend.ResetResponse")
proto.RegisterType((*GetReportsRequest)(nil), "istio.testing.mixer.policybackend.GetReportsRequest")
proto.RegisterType((*GetReportsResponse)(nil), "istio.testing.mixer.policybackend.GetReportsResponse")
}
// 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
// Client API for ControllerService service
type ControllerServiceClient interface {
// Set changes settings of the fake policy backend.
Set(ctx context.Context, in *SetRequest, opts ...grpc.CallOption) (*SetResponse, error)
// Resets the internal state of the policy backend (i.e. all settings are reverted to the default values
// and all accumulated state is cleared.
Reset(ctx context.Context, in *ResetRequest, opts ...grpc.CallOption) (*ResetResponse, error)
// GetReports returns the accumulated set of reports from the service. The server clears out its
// accumulated cache once the call completes.
GetReports(ctx context.Context, in *GetReportsRequest, opts ...grpc.CallOption) (*GetReportsResponse, error)
}
type controllerServiceClient struct {
cc *grpc.ClientConn
}
func NewControllerServiceClient(cc *grpc.ClientConn) ControllerServiceClient {
return &controllerServiceClient{cc}
}
func (c *controllerServiceClient) Set(ctx context.Context, in *SetRequest, opts ...grpc.CallOption) (*SetResponse, error) {
out := new(SetResponse)
err := grpc.Invoke(ctx, "/istio.testing.mixer.policybackend.ControllerService/Set", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *controllerServiceClient) Reset(ctx context.Context, in *ResetRequest, opts ...grpc.CallOption) (*ResetResponse, error) {
out := new(ResetResponse)
err := grpc.Invoke(ctx, "/istio.testing.mixer.policybackend.ControllerService/Reset", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *controllerServiceClient) GetReports(ctx context.Context, in *GetReportsRequest, opts ...grpc.CallOption) (*GetReportsResponse, error) {
out := new(GetReportsResponse)
err := grpc.Invoke(ctx, "/istio.testing.mixer.policybackend.ControllerService/GetReports", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// Server API for ControllerService service
type ControllerServiceServer interface {
// Set changes settings of the fake policy backend.
Set(context.Context, *SetRequest) (*SetResponse, error)
// Resets the internal state of the policy backend (i.e. all settings are reverted to the default values
// and all accumulated state is cleared.
Reset(context.Context, *ResetRequest) (*ResetResponse, error)
// GetReports returns the accumulated set of reports from the service. The server clears out its
// accumulated cache once the call completes.
GetReports(context.Context, *GetReportsRequest) (*GetReportsResponse, error)
}
func RegisterControllerServiceServer(s *grpc.Server, srv ControllerServiceServer) {
s.RegisterService(&_ControllerService_serviceDesc, srv)
}
func _ControllerService_Set_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(SetRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ControllerServiceServer).Set(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/istio.testing.mixer.policybackend.ControllerService/Set",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ControllerServiceServer).Set(ctx, req.(*SetRequest))
}
return interceptor(ctx, in, info, handler)
}
func _ControllerService_Reset_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ResetRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ControllerServiceServer).Reset(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/istio.testing.mixer.policybackend.ControllerService/Reset",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ControllerServiceServer).Reset(ctx, req.(*ResetRequest))
}
return interceptor(ctx, in, info, handler)
}
func _ControllerService_GetReports_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetReportsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ControllerServiceServer).GetReports(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/istio.testing.mixer.policybackend.ControllerService/GetReports",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ControllerServiceServer).GetReports(ctx, req.(*GetReportsRequest))
}
return interceptor(ctx, in, info, handler)
}
var _ControllerService_serviceDesc = grpc.ServiceDesc{
ServiceName: "istio.testing.mixer.policybackend.ControllerService",
HandlerType: (*ControllerServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "Set",
Handler: _ControllerService_Set_Handler,
},
{
MethodName: "Reset",
Handler: _ControllerService_Reset_Handler,
},
{
MethodName: "GetReports",
Handler: _ControllerService_GetReports_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "controller.proto",
}
func init() { proto.RegisterFile("controller.proto", fileDescriptorController) }
var fileDescriptorController = []byte{
// 328 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x51, 0xcd, 0x4e, 0xc2, 0x40,
0x10, 0x4e, 0x21, 0x10, 0x18, 0x44, 0x61, 0xe5, 0x80, 0x3d, 0x61, 0x4f, 0x5c, 0x5c, 0x0c, 0x6a,
0x62, 0xe4, 0xa4, 0xc6, 0xe8, 0xb9, 0x1c, 0x4c, 0xbc, 0x95, 0x32, 0x92, 0x95, 0xba, 0x8b, 0xbb,
0x03, 0x71, 0x5f, 0xc7, 0x27, 0xf3, 0x51, 0x4c, 0xb7, 0xe5, 0xc7, 0x78, 0xb0, 0xdc, 0x76, 0x66,
0xbe, 0x9f, 0x9d, 0x6f, 0xa0, 0x15, 0x2b, 0x49, 0x5a, 0x25, 0x09, 0x6a, 0xbe, 0xd0, 0x8a, 0x14,
0x3b, 0x15, 0x86, 0x84, 0xe2, 0x84, 0x86, 0x84, 0x9c, 0xf1, 0x77, 0xf1, 0x99, 0x8e, 0x54, 0x22,
0x62, 0x3b, 0x89, 0xe2, 0x39, 0xca, 0xa9, 0x7f, 0x32, 0x53, 0x6a, 0x96, 0xe0, 0xc0, 0x11, 0x26,
0xcb, 0xd7, 0x41, 0x24, 0x6d, 0xc6, 0x0e, 0xbe, 0x3c, 0x80, 0x31, 0x52, 0x88, 0x1f, 0x4b, 0x34,
0xc4, 0x9e, 0xa1, 0x66, 0x90, 0x52, 0x21, 0xd3, 0xf5, 0x7a, 0xe5, 0x7e, 0x63, 0x38, 0xe2, 0xff,
0xea, 0xf3, 0xad, 0x40, 0xfa, 0x74, 0xec, 0x07, 0x49, 0xda, 0x86, 0x1b, 0x31, 0x7f, 0x04, 0xcd,
0x5f, 0x23, 0xd6, 0x82, 0xf2, 0x1c, 0x6d, 0xd7, 0xeb, 0x79, 0xfd, 0x7a, 0x98, 0x3e, 0x59, 0x07,
0x2a, 0xab, 0x28, 0x59, 0x62, 0xb7, 0xe4, 0x7a, 0x59, 0x71, 0x53, 0xba, 0xf6, 0x82, 0x26, 0x34,
0x9c, 0x85, 0x59, 0x28, 0x69, 0x30, 0x38, 0x84, 0x83, 0x10, 0xcd, 0xc6, 0x33, 0x38, 0x82, 0x66,
0x5e, 0xe7, 0x80, 0x63, 0x68, 0x3f, 0xa6, 0xe5, 0x42, 0x69, 0x32, 0x6b, 0xd4, 0x13, 0xb0, 0xdd,
0x66, 0x06, 0x65, 0x43, 0xa8, 0x0b, 0x69, 0x28, 0x92, 0x31, 0xae, 0x37, 0xee, 0xf0, 0x2c, 0x2e,
0xbe, 0x8e, 0x8b, 0xdf, 0x4a, 0x1b, 0x6e, 0x61, 0xc3, 0xef, 0x12, 0xb4, 0xef, 0x37, 0x67, 0x18,
0xa3, 0x5e, 0x89, 0x18, 0xd9, 0x14, 0xca, 0x63, 0x24, 0x76, 0xb6, 0x57, 0x5e, 0x3e, 0x2f, 0x0a,
0xcf, 0xff, 0xfb, 0x06, 0x15, 0xb7, 0x2b, 0x1b, 0x14, 0x20, 0xee, 0xa6, 0xe4, 0x9f, 0x17, 0x27,
0xe4, 0x5e, 0x16, 0x60, 0x9b, 0x18, 0xbb, 0x2c, 0xc0, 0xff, 0x93, 0xba, 0x7f, 0xb5, 0x27, 0x2b,
0xb3, 0xbe, 0xab, 0xbd, 0x54, 0x73, 0x4c, 0xd5, 0x5d, 0xe1, 0xe2, 0x27, 0x00, 0x00, 0xff, 0xff,
0xe9, 0x5b, 0xb2, 0xe6, 0xf9, 0x02, 0x00, 0x00,
}