forked from distribution/distribution
-
Notifications
You must be signed in to change notification settings - Fork 1
/
bigtable_service.pb.go
287 lines (252 loc) · 9.83 KB
/
bigtable_service.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
// Code generated by protoc-gen-go.
// source: google.golang.org/cloud/bigtable/internal/service_proto/bigtable_service.proto
// DO NOT EDIT!
package google_bigtable_v1
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import google_bigtable_v11 "google.golang.org/cloud/bigtable/internal/data_proto"
import google_protobuf "google.golang.org/cloud/bigtable/internal/empty"
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
// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConn
// Client API for BigtableService service
type BigtableServiceClient interface {
// Streams back the contents of all requested rows, optionally applying
// the same Reader filter to each. Depending on their size, rows may be
// broken up across multiple responses, but atomicity of each row will still
// be preserved.
ReadRows(ctx context.Context, in *ReadRowsRequest, opts ...grpc.CallOption) (BigtableService_ReadRowsClient, error)
// Returns a sample of row keys in the table. The returned row keys will
// delimit contiguous sections of the table of approximately equal size,
// which can be used to break up the data for distributed tasks like
// mapreduces.
SampleRowKeys(ctx context.Context, in *SampleRowKeysRequest, opts ...grpc.CallOption) (BigtableService_SampleRowKeysClient, error)
// Mutates a row atomically. Cells already present in the row are left
// unchanged unless explicitly changed by 'mutation'.
MutateRow(ctx context.Context, in *MutateRowRequest, opts ...grpc.CallOption) (*google_protobuf.Empty, error)
// Mutates a row atomically based on the output of a predicate Reader filter.
CheckAndMutateRow(ctx context.Context, in *CheckAndMutateRowRequest, opts ...grpc.CallOption) (*CheckAndMutateRowResponse, error)
// Modifies a row atomically, reading the latest existing timestamp/value from
// the specified columns and writing a new value at
// max(existing timestamp, current server time) based on pre-defined
// read/modify/write rules. Returns the new contents of all modified cells.
ReadModifyWriteRow(ctx context.Context, in *ReadModifyWriteRowRequest, opts ...grpc.CallOption) (*google_bigtable_v11.Row, error)
}
type bigtableServiceClient struct {
cc *grpc.ClientConn
}
func NewBigtableServiceClient(cc *grpc.ClientConn) BigtableServiceClient {
return &bigtableServiceClient{cc}
}
func (c *bigtableServiceClient) ReadRows(ctx context.Context, in *ReadRowsRequest, opts ...grpc.CallOption) (BigtableService_ReadRowsClient, error) {
stream, err := grpc.NewClientStream(ctx, &_BigtableService_serviceDesc.Streams[0], c.cc, "/google.bigtable.v1.BigtableService/ReadRows", opts...)
if err != nil {
return nil, err
}
x := &bigtableServiceReadRowsClient{stream}
if err := x.ClientStream.SendMsg(in); err != nil {
return nil, err
}
if err := x.ClientStream.CloseSend(); err != nil {
return nil, err
}
return x, nil
}
type BigtableService_ReadRowsClient interface {
Recv() (*ReadRowsResponse, error)
grpc.ClientStream
}
type bigtableServiceReadRowsClient struct {
grpc.ClientStream
}
func (x *bigtableServiceReadRowsClient) Recv() (*ReadRowsResponse, error) {
m := new(ReadRowsResponse)
if err := x.ClientStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
func (c *bigtableServiceClient) SampleRowKeys(ctx context.Context, in *SampleRowKeysRequest, opts ...grpc.CallOption) (BigtableService_SampleRowKeysClient, error) {
stream, err := grpc.NewClientStream(ctx, &_BigtableService_serviceDesc.Streams[1], c.cc, "/google.bigtable.v1.BigtableService/SampleRowKeys", opts...)
if err != nil {
return nil, err
}
x := &bigtableServiceSampleRowKeysClient{stream}
if err := x.ClientStream.SendMsg(in); err != nil {
return nil, err
}
if err := x.ClientStream.CloseSend(); err != nil {
return nil, err
}
return x, nil
}
type BigtableService_SampleRowKeysClient interface {
Recv() (*SampleRowKeysResponse, error)
grpc.ClientStream
}
type bigtableServiceSampleRowKeysClient struct {
grpc.ClientStream
}
func (x *bigtableServiceSampleRowKeysClient) Recv() (*SampleRowKeysResponse, error) {
m := new(SampleRowKeysResponse)
if err := x.ClientStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
func (c *bigtableServiceClient) MutateRow(ctx context.Context, in *MutateRowRequest, opts ...grpc.CallOption) (*google_protobuf.Empty, error) {
out := new(google_protobuf.Empty)
err := grpc.Invoke(ctx, "/google.bigtable.v1.BigtableService/MutateRow", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *bigtableServiceClient) CheckAndMutateRow(ctx context.Context, in *CheckAndMutateRowRequest, opts ...grpc.CallOption) (*CheckAndMutateRowResponse, error) {
out := new(CheckAndMutateRowResponse)
err := grpc.Invoke(ctx, "/google.bigtable.v1.BigtableService/CheckAndMutateRow", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *bigtableServiceClient) ReadModifyWriteRow(ctx context.Context, in *ReadModifyWriteRowRequest, opts ...grpc.CallOption) (*google_bigtable_v11.Row, error) {
out := new(google_bigtable_v11.Row)
err := grpc.Invoke(ctx, "/google.bigtable.v1.BigtableService/ReadModifyWriteRow", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// Server API for BigtableService service
type BigtableServiceServer interface {
// Streams back the contents of all requested rows, optionally applying
// the same Reader filter to each. Depending on their size, rows may be
// broken up across multiple responses, but atomicity of each row will still
// be preserved.
ReadRows(*ReadRowsRequest, BigtableService_ReadRowsServer) error
// Returns a sample of row keys in the table. The returned row keys will
// delimit contiguous sections of the table of approximately equal size,
// which can be used to break up the data for distributed tasks like
// mapreduces.
SampleRowKeys(*SampleRowKeysRequest, BigtableService_SampleRowKeysServer) error
// Mutates a row atomically. Cells already present in the row are left
// unchanged unless explicitly changed by 'mutation'.
MutateRow(context.Context, *MutateRowRequest) (*google_protobuf.Empty, error)
// Mutates a row atomically based on the output of a predicate Reader filter.
CheckAndMutateRow(context.Context, *CheckAndMutateRowRequest) (*CheckAndMutateRowResponse, error)
// Modifies a row atomically, reading the latest existing timestamp/value from
// the specified columns and writing a new value at
// max(existing timestamp, current server time) based on pre-defined
// read/modify/write rules. Returns the new contents of all modified cells.
ReadModifyWriteRow(context.Context, *ReadModifyWriteRowRequest) (*google_bigtable_v11.Row, error)
}
func RegisterBigtableServiceServer(s *grpc.Server, srv BigtableServiceServer) {
s.RegisterService(&_BigtableService_serviceDesc, srv)
}
func _BigtableService_ReadRows_Handler(srv interface{}, stream grpc.ServerStream) error {
m := new(ReadRowsRequest)
if err := stream.RecvMsg(m); err != nil {
return err
}
return srv.(BigtableServiceServer).ReadRows(m, &bigtableServiceReadRowsServer{stream})
}
type BigtableService_ReadRowsServer interface {
Send(*ReadRowsResponse) error
grpc.ServerStream
}
type bigtableServiceReadRowsServer struct {
grpc.ServerStream
}
func (x *bigtableServiceReadRowsServer) Send(m *ReadRowsResponse) error {
return x.ServerStream.SendMsg(m)
}
func _BigtableService_SampleRowKeys_Handler(srv interface{}, stream grpc.ServerStream) error {
m := new(SampleRowKeysRequest)
if err := stream.RecvMsg(m); err != nil {
return err
}
return srv.(BigtableServiceServer).SampleRowKeys(m, &bigtableServiceSampleRowKeysServer{stream})
}
type BigtableService_SampleRowKeysServer interface {
Send(*SampleRowKeysResponse) error
grpc.ServerStream
}
type bigtableServiceSampleRowKeysServer struct {
grpc.ServerStream
}
func (x *bigtableServiceSampleRowKeysServer) Send(m *SampleRowKeysResponse) error {
return x.ServerStream.SendMsg(m)
}
func _BigtableService_MutateRow_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error) (interface{}, error) {
in := new(MutateRowRequest)
if err := dec(in); err != nil {
return nil, err
}
out, err := srv.(BigtableServiceServer).MutateRow(ctx, in)
if err != nil {
return nil, err
}
return out, nil
}
func _BigtableService_CheckAndMutateRow_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error) (interface{}, error) {
in := new(CheckAndMutateRowRequest)
if err := dec(in); err != nil {
return nil, err
}
out, err := srv.(BigtableServiceServer).CheckAndMutateRow(ctx, in)
if err != nil {
return nil, err
}
return out, nil
}
func _BigtableService_ReadModifyWriteRow_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error) (interface{}, error) {
in := new(ReadModifyWriteRowRequest)
if err := dec(in); err != nil {
return nil, err
}
out, err := srv.(BigtableServiceServer).ReadModifyWriteRow(ctx, in)
if err != nil {
return nil, err
}
return out, nil
}
var _BigtableService_serviceDesc = grpc.ServiceDesc{
ServiceName: "google.bigtable.v1.BigtableService",
HandlerType: (*BigtableServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "MutateRow",
Handler: _BigtableService_MutateRow_Handler,
},
{
MethodName: "CheckAndMutateRow",
Handler: _BigtableService_CheckAndMutateRow_Handler,
},
{
MethodName: "ReadModifyWriteRow",
Handler: _BigtableService_ReadModifyWriteRow_Handler,
},
},
Streams: []grpc.StreamDesc{
{
StreamName: "ReadRows",
Handler: _BigtableService_ReadRows_Handler,
ServerStreams: true,
},
{
StreamName: "SampleRowKeys",
Handler: _BigtableService_SampleRowKeys_Handler,
ServerStreams: true,
},
},
}