/
cluster.pb.go
401 lines (351 loc) · 13.6 KB
/
cluster.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
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: orderer/cluster.proto
package orderer // import "github.com/hyperledger/fabric/protos/orderer"
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import common "github.com/hyperledger/fabric/protos/common"
import (
context "golang.org/x/net/context"
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.ProtoPackageIsVersion2 // please upgrade the proto package
// StepRequest wraps a consensus implementation
// specific message that is sent to a cluster member
type StepRequest struct {
Channel string `protobuf:"bytes,1,opt,name=channel" json:"channel,omitempty"`
Payload []byte `protobuf:"bytes,2,opt,name=payload,proto3" json:"payload,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *StepRequest) Reset() { *m = StepRequest{} }
func (m *StepRequest) String() string { return proto.CompactTextString(m) }
func (*StepRequest) ProtoMessage() {}
func (*StepRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_cluster_fa8fc28779c58bfb, []int{0}
}
func (m *StepRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_StepRequest.Unmarshal(m, b)
}
func (m *StepRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_StepRequest.Marshal(b, m, deterministic)
}
func (dst *StepRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_StepRequest.Merge(dst, src)
}
func (m *StepRequest) XXX_Size() int {
return xxx_messageInfo_StepRequest.Size(m)
}
func (m *StepRequest) XXX_DiscardUnknown() {
xxx_messageInfo_StepRequest.DiscardUnknown(m)
}
var xxx_messageInfo_StepRequest proto.InternalMessageInfo
func (m *StepRequest) GetChannel() string {
if m != nil {
return m.Channel
}
return ""
}
func (m *StepRequest) GetPayload() []byte {
if m != nil {
return m.Payload
}
return nil
}
// StepResponse wraps a consensus implementation
// specific message that is received from
// a cluster member as a response to a StepRequest
type StepResponse struct {
Payload []byte `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *StepResponse) Reset() { *m = StepResponse{} }
func (m *StepResponse) String() string { return proto.CompactTextString(m) }
func (*StepResponse) ProtoMessage() {}
func (*StepResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_cluster_fa8fc28779c58bfb, []int{1}
}
func (m *StepResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_StepResponse.Unmarshal(m, b)
}
func (m *StepResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_StepResponse.Marshal(b, m, deterministic)
}
func (dst *StepResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_StepResponse.Merge(dst, src)
}
func (m *StepResponse) XXX_Size() int {
return xxx_messageInfo_StepResponse.Size(m)
}
func (m *StepResponse) XXX_DiscardUnknown() {
xxx_messageInfo_StepResponse.DiscardUnknown(m)
}
var xxx_messageInfo_StepResponse proto.InternalMessageInfo
func (m *StepResponse) GetPayload() []byte {
if m != nil {
return m.Payload
}
return nil
}
// SubmitRequest wraps a transaction to be sent for ordering
type SubmitRequest struct {
Channel string `protobuf:"bytes,1,opt,name=channel" json:"channel,omitempty"`
// last_validation_seq denotes the last
// configuration sequence at which the
// sender validated this message
LastValidationSeq uint64 `protobuf:"varint,2,opt,name=last_validation_seq,json=lastValidationSeq" json:"last_validation_seq,omitempty"`
// content is the fabric transaction
// that is forwarded to the cluster member
Content *common.Envelope `protobuf:"bytes,3,opt,name=content" json:"content,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *SubmitRequest) Reset() { *m = SubmitRequest{} }
func (m *SubmitRequest) String() string { return proto.CompactTextString(m) }
func (*SubmitRequest) ProtoMessage() {}
func (*SubmitRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_cluster_fa8fc28779c58bfb, []int{2}
}
func (m *SubmitRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SubmitRequest.Unmarshal(m, b)
}
func (m *SubmitRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_SubmitRequest.Marshal(b, m, deterministic)
}
func (dst *SubmitRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_SubmitRequest.Merge(dst, src)
}
func (m *SubmitRequest) XXX_Size() int {
return xxx_messageInfo_SubmitRequest.Size(m)
}
func (m *SubmitRequest) XXX_DiscardUnknown() {
xxx_messageInfo_SubmitRequest.DiscardUnknown(m)
}
var xxx_messageInfo_SubmitRequest proto.InternalMessageInfo
func (m *SubmitRequest) GetChannel() string {
if m != nil {
return m.Channel
}
return ""
}
func (m *SubmitRequest) GetLastValidationSeq() uint64 {
if m != nil {
return m.LastValidationSeq
}
return 0
}
func (m *SubmitRequest) GetContent() *common.Envelope {
if m != nil {
return m.Content
}
return nil
}
// SubmitResponse returns a success
// or failure status to the sender
type SubmitResponse struct {
// Status code, which may be used to programatically respond to success/failure
Status common.Status `protobuf:"varint,1,opt,name=status,enum=common.Status" json:"status,omitempty"`
// Info string which may contain additional information about the status returned
Info string `protobuf:"bytes,2,opt,name=info" json:"info,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *SubmitResponse) Reset() { *m = SubmitResponse{} }
func (m *SubmitResponse) String() string { return proto.CompactTextString(m) }
func (*SubmitResponse) ProtoMessage() {}
func (*SubmitResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_cluster_fa8fc28779c58bfb, []int{3}
}
func (m *SubmitResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SubmitResponse.Unmarshal(m, b)
}
func (m *SubmitResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_SubmitResponse.Marshal(b, m, deterministic)
}
func (dst *SubmitResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_SubmitResponse.Merge(dst, src)
}
func (m *SubmitResponse) XXX_Size() int {
return xxx_messageInfo_SubmitResponse.Size(m)
}
func (m *SubmitResponse) XXX_DiscardUnknown() {
xxx_messageInfo_SubmitResponse.DiscardUnknown(m)
}
var xxx_messageInfo_SubmitResponse proto.InternalMessageInfo
func (m *SubmitResponse) GetStatus() common.Status {
if m != nil {
return m.Status
}
return common.Status_UNKNOWN
}
func (m *SubmitResponse) GetInfo() string {
if m != nil {
return m.Info
}
return ""
}
func init() {
proto.RegisterType((*StepRequest)(nil), "orderer.StepRequest")
proto.RegisterType((*StepResponse)(nil), "orderer.StepResponse")
proto.RegisterType((*SubmitRequest)(nil), "orderer.SubmitRequest")
proto.RegisterType((*SubmitResponse)(nil), "orderer.SubmitResponse")
}
// 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 Cluster service
type ClusterClient interface {
// Submit submits transactions to a cluster member
Submit(ctx context.Context, opts ...grpc.CallOption) (Cluster_SubmitClient, error)
// Step passes an implementation-specific message to another cluster member.
Step(ctx context.Context, in *StepRequest, opts ...grpc.CallOption) (*StepResponse, error)
}
type clusterClient struct {
cc *grpc.ClientConn
}
func NewClusterClient(cc *grpc.ClientConn) ClusterClient {
return &clusterClient{cc}
}
func (c *clusterClient) Submit(ctx context.Context, opts ...grpc.CallOption) (Cluster_SubmitClient, error) {
stream, err := grpc.NewClientStream(ctx, &_Cluster_serviceDesc.Streams[0], c.cc, "/orderer.Cluster/Submit", opts...)
if err != nil {
return nil, err
}
x := &clusterSubmitClient{stream}
return x, nil
}
type Cluster_SubmitClient interface {
Send(*SubmitRequest) error
Recv() (*SubmitResponse, error)
grpc.ClientStream
}
type clusterSubmitClient struct {
grpc.ClientStream
}
func (x *clusterSubmitClient) Send(m *SubmitRequest) error {
return x.ClientStream.SendMsg(m)
}
func (x *clusterSubmitClient) Recv() (*SubmitResponse, error) {
m := new(SubmitResponse)
if err := x.ClientStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
func (c *clusterClient) Step(ctx context.Context, in *StepRequest, opts ...grpc.CallOption) (*StepResponse, error) {
out := new(StepResponse)
err := grpc.Invoke(ctx, "/orderer.Cluster/Step", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// Server API for Cluster service
type ClusterServer interface {
// Submit submits transactions to a cluster member
Submit(Cluster_SubmitServer) error
// Step passes an implementation-specific message to another cluster member.
Step(context.Context, *StepRequest) (*StepResponse, error)
}
func RegisterClusterServer(s *grpc.Server, srv ClusterServer) {
s.RegisterService(&_Cluster_serviceDesc, srv)
}
func _Cluster_Submit_Handler(srv interface{}, stream grpc.ServerStream) error {
return srv.(ClusterServer).Submit(&clusterSubmitServer{stream})
}
type Cluster_SubmitServer interface {
Send(*SubmitResponse) error
Recv() (*SubmitRequest, error)
grpc.ServerStream
}
type clusterSubmitServer struct {
grpc.ServerStream
}
func (x *clusterSubmitServer) Send(m *SubmitResponse) error {
return x.ServerStream.SendMsg(m)
}
func (x *clusterSubmitServer) Recv() (*SubmitRequest, error) {
m := new(SubmitRequest)
if err := x.ServerStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
func _Cluster_Step_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(StepRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ClusterServer).Step(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/orderer.Cluster/Step",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ClusterServer).Step(ctx, req.(*StepRequest))
}
return interceptor(ctx, in, info, handler)
}
var _Cluster_serviceDesc = grpc.ServiceDesc{
ServiceName: "orderer.Cluster",
HandlerType: (*ClusterServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "Step",
Handler: _Cluster_Step_Handler,
},
},
Streams: []grpc.StreamDesc{
{
StreamName: "Submit",
Handler: _Cluster_Submit_Handler,
ServerStreams: true,
ClientStreams: true,
},
},
Metadata: "orderer/cluster.proto",
}
func init() { proto.RegisterFile("orderer/cluster.proto", fileDescriptor_cluster_fa8fc28779c58bfb) }
var fileDescriptor_cluster_fa8fc28779c58bfb = []byte{
// 347 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x91, 0xc1, 0x4f, 0xf2, 0x40,
0x10, 0xc5, 0xb3, 0xdf, 0x47, 0x68, 0x18, 0x90, 0xe8, 0x22, 0xda, 0x70, 0x22, 0x24, 0x9a, 0xc6,
0x98, 0xd6, 0xc0, 0xd9, 0x83, 0x1a, 0x6f, 0x9e, 0xda, 0xe8, 0xc1, 0x0b, 0xd9, 0xb6, 0x03, 0x34,
0x59, 0x76, 0xcb, 0xee, 0x96, 0x84, 0x83, 0x47, 0xff, 0x6f, 0xd3, 0x6e, 0x2b, 0xa0, 0x07, 0x4f,
0xed, 0xbc, 0xf7, 0x9b, 0xdd, 0x37, 0xb3, 0x30, 0x94, 0x2a, 0x45, 0x85, 0x2a, 0x48, 0x78, 0xa1,
0x0d, 0x2a, 0x3f, 0x57, 0xd2, 0x48, 0xea, 0xd4, 0xf2, 0x68, 0x90, 0xc8, 0xf5, 0x5a, 0x8a, 0xc0,
0x7e, 0xac, 0x3b, 0x79, 0x80, 0x6e, 0x64, 0x30, 0x0f, 0x71, 0x53, 0xa0, 0x36, 0xd4, 0x05, 0x27,
0x59, 0x31, 0x21, 0x90, 0xbb, 0x64, 0x4c, 0xbc, 0x4e, 0xd8, 0x94, 0xa5, 0x93, 0xb3, 0x1d, 0x97,
0x2c, 0x75, 0xff, 0x8d, 0x89, 0xd7, 0x0b, 0x9b, 0x72, 0xe2, 0x41, 0xcf, 0x1e, 0xa1, 0x73, 0x29,
0x34, 0x1e, 0x92, 0xe4, 0x98, 0xfc, 0x24, 0x70, 0x12, 0x15, 0x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