github.com/cockroachdb/cockroach@v20.2.0-alpha.1+incompatible/pkg/kv/kvserver/storage_services.pb.go (about) 1 // Code generated by protoc-gen-gogo. DO NOT EDIT. 2 // source: kv/kvserver/storage_services.proto 3 4 package kvserver 5 6 import proto "github.com/gogo/protobuf/proto" 7 import fmt "fmt" 8 import math "math" 9 10 import ( 11 context "context" 12 grpc "google.golang.org/grpc" 13 ) 14 15 // Reference imports to suppress errors if they are not otherwise used. 16 var _ = proto.Marshal 17 var _ = fmt.Errorf 18 var _ = math.Inf 19 20 // This is a compile-time assertion to ensure that this generated file 21 // is compatible with the proto package it is being compiled against. 22 // A compilation error at this line likely means your copy of the 23 // proto package needs to be updated. 24 const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package 25 26 // Reference imports to suppress errors if they are not otherwise used. 27 var _ context.Context 28 var _ grpc.ClientConn 29 30 // This is a compile-time assertion to ensure that this generated file 31 // is compatible with the grpc package it is being compiled against. 32 const _ = grpc.SupportPackageIsVersion4 33 34 // MultiRaftClient is the client API for MultiRaft service. 35 // 36 // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. 37 type MultiRaftClient interface { 38 RaftMessageBatch(ctx context.Context, opts ...grpc.CallOption) (MultiRaft_RaftMessageBatchClient, error) 39 RaftSnapshot(ctx context.Context, opts ...grpc.CallOption) (MultiRaft_RaftSnapshotClient, error) 40 } 41 42 type multiRaftClient struct { 43 cc *grpc.ClientConn 44 } 45 46 func NewMultiRaftClient(cc *grpc.ClientConn) MultiRaftClient { 47 return &multiRaftClient{cc} 48 } 49 50 func (c *multiRaftClient) RaftMessageBatch(ctx context.Context, opts ...grpc.CallOption) (MultiRaft_RaftMessageBatchClient, error) { 51 stream, err := c.cc.NewStream(ctx, &_MultiRaft_serviceDesc.Streams[0], "/cockroach.storage.MultiRaft/RaftMessageBatch", opts...) 52 if err != nil { 53 return nil, err 54 } 55 x := &multiRaftRaftMessageBatchClient{stream} 56 return x, nil 57 } 58 59 type MultiRaft_RaftMessageBatchClient interface { 60 Send(*RaftMessageRequestBatch) error 61 Recv() (*RaftMessageResponse, error) 62 grpc.ClientStream 63 } 64 65 type multiRaftRaftMessageBatchClient struct { 66 grpc.ClientStream 67 } 68 69 func (x *multiRaftRaftMessageBatchClient) Send(m *RaftMessageRequestBatch) error { 70 return x.ClientStream.SendMsg(m) 71 } 72 73 func (x *multiRaftRaftMessageBatchClient) Recv() (*RaftMessageResponse, error) { 74 m := new(RaftMessageResponse) 75 if err := x.ClientStream.RecvMsg(m); err != nil { 76 return nil, err 77 } 78 return m, nil 79 } 80 81 func (c *multiRaftClient) RaftSnapshot(ctx context.Context, opts ...grpc.CallOption) (MultiRaft_RaftSnapshotClient, error) { 82 stream, err := c.cc.NewStream(ctx, &_MultiRaft_serviceDesc.Streams[1], "/cockroach.storage.MultiRaft/RaftSnapshot", opts...) 83 if err != nil { 84 return nil, err 85 } 86 x := &multiRaftRaftSnapshotClient{stream} 87 return x, nil 88 } 89 90 type MultiRaft_RaftSnapshotClient interface { 91 Send(*SnapshotRequest) error 92 Recv() (*SnapshotResponse, error) 93 grpc.ClientStream 94 } 95 96 type multiRaftRaftSnapshotClient struct { 97 grpc.ClientStream 98 } 99 100 func (x *multiRaftRaftSnapshotClient) Send(m *SnapshotRequest) error { 101 return x.ClientStream.SendMsg(m) 102 } 103 104 func (x *multiRaftRaftSnapshotClient) Recv() (*SnapshotResponse, error) { 105 m := new(SnapshotResponse) 106 if err := x.ClientStream.RecvMsg(m); err != nil { 107 return nil, err 108 } 109 return m, nil 110 } 111 112 // MultiRaftServer is the server API for MultiRaft service. 113 type MultiRaftServer interface { 114 RaftMessageBatch(MultiRaft_RaftMessageBatchServer) error 115 RaftSnapshot(MultiRaft_RaftSnapshotServer) error 116 } 117 118 func RegisterMultiRaftServer(s *grpc.Server, srv MultiRaftServer) { 119 s.RegisterService(&_MultiRaft_serviceDesc, srv) 120 } 121 122 func _MultiRaft_RaftMessageBatch_Handler(srv interface{}, stream grpc.ServerStream) error { 123 return srv.(MultiRaftServer).RaftMessageBatch(&multiRaftRaftMessageBatchServer{stream}) 124 } 125 126 type MultiRaft_RaftMessageBatchServer interface { 127 Send(*RaftMessageResponse) error 128 Recv() (*RaftMessageRequestBatch, error) 129 grpc.ServerStream 130 } 131 132 type multiRaftRaftMessageBatchServer struct { 133 grpc.ServerStream 134 } 135 136 func (x *multiRaftRaftMessageBatchServer) Send(m *RaftMessageResponse) error { 137 return x.ServerStream.SendMsg(m) 138 } 139 140 func (x *multiRaftRaftMessageBatchServer) Recv() (*RaftMessageRequestBatch, error) { 141 m := new(RaftMessageRequestBatch) 142 if err := x.ServerStream.RecvMsg(m); err != nil { 143 return nil, err 144 } 145 return m, nil 146 } 147 148 func _MultiRaft_RaftSnapshot_Handler(srv interface{}, stream grpc.ServerStream) error { 149 return srv.(MultiRaftServer).RaftSnapshot(&multiRaftRaftSnapshotServer{stream}) 150 } 151 152 type MultiRaft_RaftSnapshotServer interface { 153 Send(*SnapshotResponse) error 154 Recv() (*SnapshotRequest, error) 155 grpc.ServerStream 156 } 157 158 type multiRaftRaftSnapshotServer struct { 159 grpc.ServerStream 160 } 161 162 func (x *multiRaftRaftSnapshotServer) Send(m *SnapshotResponse) error { 163 return x.ServerStream.SendMsg(m) 164 } 165 166 func (x *multiRaftRaftSnapshotServer) Recv() (*SnapshotRequest, error) { 167 m := new(SnapshotRequest) 168 if err := x.ServerStream.RecvMsg(m); err != nil { 169 return nil, err 170 } 171 return m, nil 172 } 173 174 var _MultiRaft_serviceDesc = grpc.ServiceDesc{ 175 ServiceName: "cockroach.storage.MultiRaft", 176 HandlerType: (*MultiRaftServer)(nil), 177 Methods: []grpc.MethodDesc{}, 178 Streams: []grpc.StreamDesc{ 179 { 180 StreamName: "RaftMessageBatch", 181 Handler: _MultiRaft_RaftMessageBatch_Handler, 182 ServerStreams: true, 183 ClientStreams: true, 184 }, 185 { 186 StreamName: "RaftSnapshot", 187 Handler: _MultiRaft_RaftSnapshot_Handler, 188 ServerStreams: true, 189 ClientStreams: true, 190 }, 191 }, 192 Metadata: "kv/kvserver/storage_services.proto", 193 } 194 195 // PerReplicaClient is the client API for PerReplica service. 196 // 197 // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. 198 type PerReplicaClient interface { 199 CollectChecksum(ctx context.Context, in *CollectChecksumRequest, opts ...grpc.CallOption) (*CollectChecksumResponse, error) 200 WaitForApplication(ctx context.Context, in *WaitForApplicationRequest, opts ...grpc.CallOption) (*WaitForApplicationResponse, error) 201 WaitForReplicaInit(ctx context.Context, in *WaitForReplicaInitRequest, opts ...grpc.CallOption) (*WaitForReplicaInitResponse, error) 202 } 203 204 type perReplicaClient struct { 205 cc *grpc.ClientConn 206 } 207 208 func NewPerReplicaClient(cc *grpc.ClientConn) PerReplicaClient { 209 return &perReplicaClient{cc} 210 } 211 212 func (c *perReplicaClient) CollectChecksum(ctx context.Context, in *CollectChecksumRequest, opts ...grpc.CallOption) (*CollectChecksumResponse, error) { 213 out := new(CollectChecksumResponse) 214 err := c.cc.Invoke(ctx, "/cockroach.storage.PerReplica/CollectChecksum", in, out, opts...) 215 if err != nil { 216 return nil, err 217 } 218 return out, nil 219 } 220 221 func (c *perReplicaClient) WaitForApplication(ctx context.Context, in *WaitForApplicationRequest, opts ...grpc.CallOption) (*WaitForApplicationResponse, error) { 222 out := new(WaitForApplicationResponse) 223 err := c.cc.Invoke(ctx, "/cockroach.storage.PerReplica/WaitForApplication", in, out, opts...) 224 if err != nil { 225 return nil, err 226 } 227 return out, nil 228 } 229 230 func (c *perReplicaClient) WaitForReplicaInit(ctx context.Context, in *WaitForReplicaInitRequest, opts ...grpc.CallOption) (*WaitForReplicaInitResponse, error) { 231 out := new(WaitForReplicaInitResponse) 232 err := c.cc.Invoke(ctx, "/cockroach.storage.PerReplica/WaitForReplicaInit", in, out, opts...) 233 if err != nil { 234 return nil, err 235 } 236 return out, nil 237 } 238 239 // PerReplicaServer is the server API for PerReplica service. 240 type PerReplicaServer interface { 241 CollectChecksum(context.Context, *CollectChecksumRequest) (*CollectChecksumResponse, error) 242 WaitForApplication(context.Context, *WaitForApplicationRequest) (*WaitForApplicationResponse, error) 243 WaitForReplicaInit(context.Context, *WaitForReplicaInitRequest) (*WaitForReplicaInitResponse, error) 244 } 245 246 func RegisterPerReplicaServer(s *grpc.Server, srv PerReplicaServer) { 247 s.RegisterService(&_PerReplica_serviceDesc, srv) 248 } 249 250 func _PerReplica_CollectChecksum_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 251 in := new(CollectChecksumRequest) 252 if err := dec(in); err != nil { 253 return nil, err 254 } 255 if interceptor == nil { 256 return srv.(PerReplicaServer).CollectChecksum(ctx, in) 257 } 258 info := &grpc.UnaryServerInfo{ 259 Server: srv, 260 FullMethod: "/cockroach.storage.PerReplica/CollectChecksum", 261 } 262 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 263 return srv.(PerReplicaServer).CollectChecksum(ctx, req.(*CollectChecksumRequest)) 264 } 265 return interceptor(ctx, in, info, handler) 266 } 267 268 func _PerReplica_WaitForApplication_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 269 in := new(WaitForApplicationRequest) 270 if err := dec(in); err != nil { 271 return nil, err 272 } 273 if interceptor == nil { 274 return srv.(PerReplicaServer).WaitForApplication(ctx, in) 275 } 276 info := &grpc.UnaryServerInfo{ 277 Server: srv, 278 FullMethod: "/cockroach.storage.PerReplica/WaitForApplication", 279 } 280 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 281 return srv.(PerReplicaServer).WaitForApplication(ctx, req.(*WaitForApplicationRequest)) 282 } 283 return interceptor(ctx, in, info, handler) 284 } 285 286 func _PerReplica_WaitForReplicaInit_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 287 in := new(WaitForReplicaInitRequest) 288 if err := dec(in); err != nil { 289 return nil, err 290 } 291 if interceptor == nil { 292 return srv.(PerReplicaServer).WaitForReplicaInit(ctx, in) 293 } 294 info := &grpc.UnaryServerInfo{ 295 Server: srv, 296 FullMethod: "/cockroach.storage.PerReplica/WaitForReplicaInit", 297 } 298 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 299 return srv.(PerReplicaServer).WaitForReplicaInit(ctx, req.(*WaitForReplicaInitRequest)) 300 } 301 return interceptor(ctx, in, info, handler) 302 } 303 304 var _PerReplica_serviceDesc = grpc.ServiceDesc{ 305 ServiceName: "cockroach.storage.PerReplica", 306 HandlerType: (*PerReplicaServer)(nil), 307 Methods: []grpc.MethodDesc{ 308 { 309 MethodName: "CollectChecksum", 310 Handler: _PerReplica_CollectChecksum_Handler, 311 }, 312 { 313 MethodName: "WaitForApplication", 314 Handler: _PerReplica_WaitForApplication_Handler, 315 }, 316 { 317 MethodName: "WaitForReplicaInit", 318 Handler: _PerReplica_WaitForReplicaInit_Handler, 319 }, 320 }, 321 Streams: []grpc.StreamDesc{}, 322 Metadata: "kv/kvserver/storage_services.proto", 323 } 324 325 func init() { 326 proto.RegisterFile("kv/kvserver/storage_services.proto", fileDescriptor_storage_services_905d475d313e6a43) 327 } 328 329 var fileDescriptor_storage_services_905d475d313e6a43 = []byte{ 330 // 332 bytes of a gzipped FileDescriptorProto 331 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x90, 0xbf, 0x4e, 0xeb, 0x30, 332 0x14, 0x87, 0xe3, 0x3b, 0xdd, 0x6b, 0x5d, 0x09, 0xb0, 0x80, 0x21, 0x83, 0x87, 0x0e, 0x80, 0x2a, 333 0xe1, 0x96, 0xbe, 0x01, 0xad, 0x84, 0xc4, 0x50, 0x09, 0x95, 0x01, 0x89, 0x05, 0x59, 0xd6, 0x69, 334 0x62, 0x25, 0xc4, 0xc1, 0x3e, 0xcd, 0xc2, 0x4b, 0xf0, 0x58, 0x1d, 0x3b, 0x76, 0x84, 0x74, 0xe1, 335 0x19, 0x98, 0x50, 0xda, 0x58, 0x84, 0x3f, 0x55, 0xcb, 0xe4, 0xe3, 0xe3, 0xef, 0xfc, 0xbe, 0x23, 336 0xd3, 0x56, 0x52, 0x74, 0x92, 0xc2, 0x81, 0x2d, 0xc0, 0x76, 0x1c, 0x1a, 0x2b, 0x23, 0xb8, 0xab, 337 0xae, 0x5a, 0x81, 0x13, 0xb9, 0x35, 0x68, 0xd8, 0x9e, 0x32, 0x2a, 0xb1, 0x46, 0xaa, 0x58, 0xd4, 338 0x44, 0x78, 0xd8, 0x1c, 0xb3, 0x72, 0x8c, 0x2b, 0x34, 0x3c, 0x68, 0xf6, 0x65, 0xae, 0xeb, 0xf6, 339 0x7e, 0x64, 0x22, 0xb3, 0x2c, 0x3b, 0x55, 0xb5, 0xea, 0xf6, 0x5e, 0x09, 0xfd, 0x37, 0x9c, 0xa4, 340 0xa8, 0x47, 0x72, 0x8c, 0x0c, 0xe9, 0x6e, 0x75, 0x0e, 0xc1, 0x39, 0x19, 0x41, 0x5f, 0xa2, 0x8a, 341 0x99, 0x10, 0x1f, 0xea, 0xa4, 0x10, 0x3e, 0x59, 0x34, 0xc0, 0x11, 0x3c, 0x4c, 0xc0, 0xe1, 0x92, 342 0x0f, 0xdb, 0xdb, 0xf0, 0x2e, 0x37, 0x99, 0x83, 0x56, 0x70, 0x42, 0xba, 0x84, 0x01, 0xfd, 0x5f, 343 0x3d, 0x5e, 0x67, 0x32, 0x77, 0xb1, 0x41, 0x76, 0xb4, 0x26, 0xc1, 0x03, 0xb5, 0x2e, 0x3c, 0xde, 344 0xc8, 0x35, 0x35, 0xbd, 0xb7, 0x3f, 0x94, 0x5e, 0x81, 0x1d, 0x41, 0x9e, 0x6a, 0x25, 0x99, 0xa5, 345 0x3b, 0x03, 0x93, 0xa6, 0xa0, 0x70, 0x10, 0x83, 0x4a, 0xdc, 0xe4, 0x9e, 0x9d, 0xae, 0x09, 0xfc, 346 0xc2, 0x79, 0xbf, 0xd8, 0x16, 0xf7, 0x6b, 0xb0, 0x47, 0xca, 0x6e, 0xa4, 0xc6, 0x0b, 0x63, 0xcf, 347 0xf3, 0xe5, 0x16, 0xa8, 0x4d, 0xc6, 0xba, 0x6b, 0x72, 0xbe, 0xa3, 0xde, 0x7c, 0xf6, 0x8b, 0x89, 348 0x1f, 0xe4, 0xf5, 0x17, 0x5c, 0x66, 0x1a, 0x37, 0xc9, 0x1b, 0xe8, 0x96, 0xf2, 0x4f, 0x13, 0x5e, 349 0xde, 0x6f, 0x4f, 0x5f, 0x78, 0x30, 0x2d, 0x39, 0x99, 0x95, 0x9c, 0xcc, 0x4b, 0x4e, 0x9e, 0x4b, 350 0x4e, 0x9e, 0x16, 0x3c, 0x98, 0x2d, 0x78, 0x30, 0x5f, 0xf0, 0xe0, 0xf6, 0xaf, 0x0f, 0x7a, 0x0f, 351 0x00, 0x00, 0xff, 0xff, 0xd9, 0x82, 0xee, 0x9f, 0x10, 0x03, 0x00, 0x00, 352 }