/
caretaker_interface.pb.go
243 lines (214 loc) · 7.94 KB
/
caretaker_interface.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
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: caretaker_interface.proto
/*
Package redcloud is a generated protocol buffer package.
It is generated from these files:
caretaker_interface.proto
data_interface.proto
metadata.proto
node_interface.proto
types.proto
It has these top-level messages:
TableName
GetRequest
ColumnRange
GetRangeRequest
InsertRequest
SSTablePathDescription
ServerTabletMetadata
ColumnFamilyMetadata
TableMetadata
ServerTableMetadata
RangeServingRequest
RangeReleaseRequest
RangeReleaseResponse
ServerStatus
Empty
Column
ColumnSet
ColumnFamily
*/
package redcloud
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
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
//
// TableName contains just the name of a table.
type TableName struct {
// Name of the table the operation is performed on.
Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
}
func (m *TableName) Reset() { *m = TableName{} }
func (m *TableName) String() string { return proto.CompactTextString(m) }
func (*TableName) ProtoMessage() {}
func (*TableName) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
func (m *TableName) GetName() string {
if m != nil {
return m.Name
}
return ""
}
func init() {
proto.RegisterType((*TableName)(nil), "redcloud.TableName")
}
// 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 AdminService service
type AdminServiceClient interface {
// Create a new table with the specified metadata.
CreateTable(ctx context.Context, in *TableMetadata, opts ...grpc.CallOption) (*Empty, error)
// Update an existing table with the specified metadata.
UpdateTable(ctx context.Context, in *TableMetadata, opts ...grpc.CallOption) (*Empty, error)
//
// Delete a table; since this will unregister it from all data nodes,
// this may take some time.
DeleteTable(ctx context.Context, in *TableName, opts ...grpc.CallOption) (*Empty, error)
}
type adminServiceClient struct {
cc *grpc.ClientConn
}
func NewAdminServiceClient(cc *grpc.ClientConn) AdminServiceClient {
return &adminServiceClient{cc}
}
func (c *adminServiceClient) CreateTable(ctx context.Context, in *TableMetadata, opts ...grpc.CallOption) (*Empty, error) {
out := new(Empty)
err := grpc.Invoke(ctx, "/redcloud.AdminService/CreateTable", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *adminServiceClient) UpdateTable(ctx context.Context, in *TableMetadata, opts ...grpc.CallOption) (*Empty, error) {
out := new(Empty)
err := grpc.Invoke(ctx, "/redcloud.AdminService/UpdateTable", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *adminServiceClient) DeleteTable(ctx context.Context, in *TableName, opts ...grpc.CallOption) (*Empty, error) {
out := new(Empty)
err := grpc.Invoke(ctx, "/redcloud.AdminService/DeleteTable", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// Server API for AdminService service
type AdminServiceServer interface {
// Create a new table with the specified metadata.
CreateTable(context.Context, *TableMetadata) (*Empty, error)
// Update an existing table with the specified metadata.
UpdateTable(context.Context, *TableMetadata) (*Empty, error)
//
// Delete a table; since this will unregister it from all data nodes,
// this may take some time.
DeleteTable(context.Context, *TableName) (*Empty, error)
}
func RegisterAdminServiceServer(s *grpc.Server, srv AdminServiceServer) {
s.RegisterService(&_AdminService_serviceDesc, srv)
}
func _AdminService_CreateTable_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(TableMetadata)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(AdminServiceServer).CreateTable(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/redcloud.AdminService/CreateTable",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(AdminServiceServer).CreateTable(ctx, req.(*TableMetadata))
}
return interceptor(ctx, in, info, handler)
}
func _AdminService_UpdateTable_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(TableMetadata)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(AdminServiceServer).UpdateTable(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/redcloud.AdminService/UpdateTable",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(AdminServiceServer).UpdateTable(ctx, req.(*TableMetadata))
}
return interceptor(ctx, in, info, handler)
}
func _AdminService_DeleteTable_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(TableName)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(AdminServiceServer).DeleteTable(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/redcloud.AdminService/DeleteTable",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(AdminServiceServer).DeleteTable(ctx, req.(*TableName))
}
return interceptor(ctx, in, info, handler)
}
var _AdminService_serviceDesc = grpc.ServiceDesc{
ServiceName: "redcloud.AdminService",
HandlerType: (*AdminServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "CreateTable",
Handler: _AdminService_CreateTable_Handler,
},
{
MethodName: "UpdateTable",
Handler: _AdminService_UpdateTable_Handler,
},
{
MethodName: "DeleteTable",
Handler: _AdminService_DeleteTable_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "caretaker_interface.proto",
}
func init() { proto.RegisterFile("caretaker_interface.proto", fileDescriptor0) }
var fileDescriptor0 = []byte{
// 192 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4c, 0x4e, 0x2c, 0x4a,
0x2d, 0x49, 0xcc, 0x4e, 0x2d, 0x8a, 0xcf, 0xcc, 0x2b, 0x49, 0x2d, 0x4a, 0x4b, 0x4c, 0x4e, 0xd5,
0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x28, 0x4a, 0x4d, 0x49, 0xce, 0xc9, 0x2f, 0x4d, 0x91,
0xe2, 0xcb, 0x4d, 0x2d, 0x49, 0x4c, 0x49, 0x2c, 0x49, 0x84, 0xc8, 0x48, 0x71, 0x97, 0x54, 0x16,
0xa4, 0x16, 0x43, 0x38, 0x4a, 0xf2, 0x5c, 0x9c, 0x21, 0x89, 0x49, 0x39, 0xa9, 0x7e, 0x89, 0xb9,
0xa9, 0x42, 0x42, 0x5c, 0x2c, 0x79, 0x89, 0xb9, 0xa9, 0x12, 0x8c, 0x0a, 0x8c, 0x1a, 0x9c, 0x41,
0x60, 0xb6, 0xd1, 0x6e, 0x46, 0x2e, 0x1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