You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

782 lines
29 KiB

  1. // Code generated by protoc-gen-go-grpc. DO NOT EDIT.
  2. // versions:
  3. // - protoc-gen-go-grpc v1.2.0
  4. // - protoc v3.21.4
  5. // source: master.proto
  6. package master_pb
  7. import (
  8. context "context"
  9. grpc "google.golang.org/grpc"
  10. codes "google.golang.org/grpc/codes"
  11. status "google.golang.org/grpc/status"
  12. )
  13. // This is a compile-time assertion to ensure that this generated file
  14. // is compatible with the grpc package it is being compiled against.
  15. // Requires gRPC-Go v1.32.0 or later.
  16. const _ = grpc.SupportPackageIsVersion7
  17. // SeaweedClient is the client API for Seaweed service.
  18. //
  19. // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
  20. type SeaweedClient interface {
  21. SendHeartbeat(ctx context.Context, opts ...grpc.CallOption) (Seaweed_SendHeartbeatClient, error)
  22. KeepConnected(ctx context.Context, opts ...grpc.CallOption) (Seaweed_KeepConnectedClient, error)
  23. LookupVolume(ctx context.Context, in *LookupVolumeRequest, opts ...grpc.CallOption) (*LookupVolumeResponse, error)
  24. Assign(ctx context.Context, in *AssignRequest, opts ...grpc.CallOption) (*AssignResponse, error)
  25. Statistics(ctx context.Context, in *StatisticsRequest, opts ...grpc.CallOption) (*StatisticsResponse, error)
  26. CollectionList(ctx context.Context, in *CollectionListRequest, opts ...grpc.CallOption) (*CollectionListResponse, error)
  27. CollectionDelete(ctx context.Context, in *CollectionDeleteRequest, opts ...grpc.CallOption) (*CollectionDeleteResponse, error)
  28. VolumeList(ctx context.Context, in *VolumeListRequest, opts ...grpc.CallOption) (*VolumeListResponse, error)
  29. LookupEcVolume(ctx context.Context, in *LookupEcVolumeRequest, opts ...grpc.CallOption) (*LookupEcVolumeResponse, error)
  30. VacuumVolume(ctx context.Context, in *VacuumVolumeRequest, opts ...grpc.CallOption) (*VacuumVolumeResponse, error)
  31. GetMasterConfiguration(ctx context.Context, in *GetMasterConfigurationRequest, opts ...grpc.CallOption) (*GetMasterConfigurationResponse, error)
  32. ListClusterNodes(ctx context.Context, in *ListClusterNodesRequest, opts ...grpc.CallOption) (*ListClusterNodesResponse, error)
  33. LeaseAdminToken(ctx context.Context, in *LeaseAdminTokenRequest, opts ...grpc.CallOption) (*LeaseAdminTokenResponse, error)
  34. ReleaseAdminToken(ctx context.Context, in *ReleaseAdminTokenRequest, opts ...grpc.CallOption) (*ReleaseAdminTokenResponse, error)
  35. Ping(ctx context.Context, in *PingRequest, opts ...grpc.CallOption) (*PingResponse, error)
  36. RaftListClusterServers(ctx context.Context, in *RaftListClusterServersRequest, opts ...grpc.CallOption) (*RaftListClusterServersResponse, error)
  37. RaftAddServer(ctx context.Context, in *RaftAddServerRequest, opts ...grpc.CallOption) (*RaftAddServerResponse, error)
  38. RaftRemoveServer(ctx context.Context, in *RaftRemoveServerRequest, opts ...grpc.CallOption) (*RaftRemoveServerResponse, error)
  39. }
  40. type seaweedClient struct {
  41. cc grpc.ClientConnInterface
  42. }
  43. func NewSeaweedClient(cc grpc.ClientConnInterface) SeaweedClient {
  44. return &seaweedClient{cc}
  45. }
  46. func (c *seaweedClient) SendHeartbeat(ctx context.Context, opts ...grpc.CallOption) (Seaweed_SendHeartbeatClient, error) {
  47. stream, err := c.cc.NewStream(ctx, &Seaweed_ServiceDesc.Streams[0], "/master_pb.Seaweed/SendHeartbeat", opts...)
  48. if err != nil {
  49. return nil, err
  50. }
  51. x := &seaweedSendHeartbeatClient{stream}
  52. return x, nil
  53. }
  54. type Seaweed_SendHeartbeatClient interface {
  55. Send(*Heartbeat) error
  56. Recv() (*HeartbeatResponse, error)
  57. grpc.ClientStream
  58. }
  59. type seaweedSendHeartbeatClient struct {
  60. grpc.ClientStream
  61. }
  62. func (x *seaweedSendHeartbeatClient) Send(m *Heartbeat) error {
  63. return x.ClientStream.SendMsg(m)
  64. }
  65. func (x *seaweedSendHeartbeatClient) Recv() (*HeartbeatResponse, error) {
  66. m := new(HeartbeatResponse)
  67. if err := x.ClientStream.RecvMsg(m); err != nil {
  68. return nil, err
  69. }
  70. return m, nil
  71. }
  72. func (c *seaweedClient) KeepConnected(ctx context.Context, opts ...grpc.CallOption) (Seaweed_KeepConnectedClient, error) {
  73. stream, err := c.cc.NewStream(ctx, &Seaweed_ServiceDesc.Streams[1], "/master_pb.Seaweed/KeepConnected", opts...)
  74. if err != nil {
  75. return nil, err
  76. }
  77. x := &seaweedKeepConnectedClient{stream}
  78. return x, nil
  79. }
  80. type Seaweed_KeepConnectedClient interface {
  81. Send(*KeepConnectedRequest) error
  82. Recv() (*KeepConnectedResponse, error)
  83. grpc.ClientStream
  84. }
  85. type seaweedKeepConnectedClient struct {
  86. grpc.ClientStream
  87. }
  88. func (x *seaweedKeepConnectedClient) Send(m *KeepConnectedRequest) error {
  89. return x.ClientStream.SendMsg(m)
  90. }
  91. func (x *seaweedKeepConnectedClient) Recv() (*KeepConnectedResponse, error) {
  92. m := new(KeepConnectedResponse)
  93. if err := x.ClientStream.RecvMsg(m); err != nil {
  94. return nil, err
  95. }
  96. return m, nil
  97. }
  98. func (c *seaweedClient) LookupVolume(ctx context.Context, in *LookupVolumeRequest, opts ...grpc.CallOption) (*LookupVolumeResponse, error) {
  99. out := new(LookupVolumeResponse)
  100. err := c.cc.Invoke(ctx, "/master_pb.Seaweed/LookupVolume", in, out, opts...)
  101. if err != nil {
  102. return nil, err
  103. }
  104. return out, nil
  105. }
  106. func (c *seaweedClient) Assign(ctx context.Context, in *AssignRequest, opts ...grpc.CallOption) (*AssignResponse, error) {
  107. out := new(AssignResponse)
  108. err := c.cc.Invoke(ctx, "/master_pb.Seaweed/Assign", in, out, opts...)
  109. if err != nil {
  110. return nil, err
  111. }
  112. return out, nil
  113. }
  114. func (c *seaweedClient) Statistics(ctx context.Context, in *StatisticsRequest, opts ...grpc.CallOption) (*StatisticsResponse, error) {
  115. out := new(StatisticsResponse)
  116. err := c.cc.Invoke(ctx, "/master_pb.Seaweed/Statistics", in, out, opts...)
  117. if err != nil {
  118. return nil, err
  119. }
  120. return out, nil
  121. }
  122. func (c *seaweedClient) CollectionList(ctx context.Context, in *CollectionListRequest, opts ...grpc.CallOption) (*CollectionListResponse, error) {
  123. out := new(CollectionListResponse)
  124. err := c.cc.Invoke(ctx, "/master_pb.Seaweed/CollectionList", in, out, opts...)
  125. if err != nil {
  126. return nil, err
  127. }
  128. return out, nil
  129. }
  130. func (c *seaweedClient) CollectionDelete(ctx context.Context, in *CollectionDeleteRequest, opts ...grpc.CallOption) (*CollectionDeleteResponse, error) {
  131. out := new(CollectionDeleteResponse)
  132. err := c.cc.Invoke(ctx, "/master_pb.Seaweed/CollectionDelete", in, out, opts...)
  133. if err != nil {
  134. return nil, err
  135. }
  136. return out, nil
  137. }
  138. func (c *seaweedClient) VolumeList(ctx context.Context, in *VolumeListRequest, opts ...grpc.CallOption) (*VolumeListResponse, error) {
  139. out := new(VolumeListResponse)
  140. err := c.cc.Invoke(ctx, "/master_pb.Seaweed/VolumeList", in, out, opts...)
  141. if err != nil {
  142. return nil, err
  143. }
  144. return out, nil
  145. }
  146. func (c *seaweedClient) LookupEcVolume(ctx context.Context, in *LookupEcVolumeRequest, opts ...grpc.CallOption) (*LookupEcVolumeResponse, error) {
  147. out := new(LookupEcVolumeResponse)
  148. err := c.cc.Invoke(ctx, "/master_pb.Seaweed/LookupEcVolume", in, out, opts...)
  149. if err != nil {
  150. return nil, err
  151. }
  152. return out, nil
  153. }
  154. func (c *seaweedClient) VacuumVolume(ctx context.Context, in *VacuumVolumeRequest, opts ...grpc.CallOption) (*VacuumVolumeResponse, error) {
  155. out := new(VacuumVolumeResponse)
  156. err := c.cc.Invoke(ctx, "/master_pb.Seaweed/VacuumVolume", in, out, opts...)
  157. if err != nil {
  158. return nil, err
  159. }
  160. return out, nil
  161. }
  162. func (c *seaweedClient) GetMasterConfiguration(ctx context.Context, in *GetMasterConfigurationRequest, opts ...grpc.CallOption) (*GetMasterConfigurationResponse, error) {
  163. out := new(GetMasterConfigurationResponse)
  164. err := c.cc.Invoke(ctx, "/master_pb.Seaweed/GetMasterConfiguration", in, out, opts...)
  165. if err != nil {
  166. return nil, err
  167. }
  168. return out, nil
  169. }
  170. func (c *seaweedClient) ListClusterNodes(ctx context.Context, in *ListClusterNodesRequest, opts ...grpc.CallOption) (*ListClusterNodesResponse, error) {
  171. out := new(ListClusterNodesResponse)
  172. err := c.cc.Invoke(ctx, "/master_pb.Seaweed/ListClusterNodes", in, out, opts...)
  173. if err != nil {
  174. return nil, err
  175. }
  176. return out, nil
  177. }
  178. func (c *seaweedClient) LeaseAdminToken(ctx context.Context, in *LeaseAdminTokenRequest, opts ...grpc.CallOption) (*LeaseAdminTokenResponse, error) {
  179. out := new(LeaseAdminTokenResponse)
  180. err := c.cc.Invoke(ctx, "/master_pb.Seaweed/LeaseAdminToken", in, out, opts...)
  181. if err != nil {
  182. return nil, err
  183. }
  184. return out, nil
  185. }
  186. func (c *seaweedClient) ReleaseAdminToken(ctx context.Context, in *ReleaseAdminTokenRequest, opts ...grpc.CallOption) (*ReleaseAdminTokenResponse, error) {
  187. out := new(ReleaseAdminTokenResponse)
  188. err := c.cc.Invoke(ctx, "/master_pb.Seaweed/ReleaseAdminToken", in, out, opts...)
  189. if err != nil {
  190. return nil, err
  191. }
  192. return out, nil
  193. }
  194. func (c *seaweedClient) Ping(ctx context.Context, in *PingRequest, opts ...grpc.CallOption) (*PingResponse, error) {
  195. out := new(PingResponse)
  196. err := c.cc.Invoke(ctx, "/master_pb.Seaweed/Ping", in, out, opts...)
  197. if err != nil {
  198. return nil, err
  199. }
  200. return out, nil
  201. }
  202. func (c *seaweedClient) RaftListClusterServers(ctx context.Context, in *RaftListClusterServersRequest, opts ...grpc.CallOption) (*RaftListClusterServersResponse, error) {
  203. out := new(RaftListClusterServersResponse)
  204. err := c.cc.Invoke(ctx, "/master_pb.Seaweed/RaftListClusterServers", in, out, opts...)
  205. if err != nil {
  206. return nil, err
  207. }
  208. return out, nil
  209. }
  210. func (c *seaweedClient) RaftAddServer(ctx context.Context, in *RaftAddServerRequest, opts ...grpc.CallOption) (*RaftAddServerResponse, error) {
  211. out := new(RaftAddServerResponse)
  212. err := c.cc.Invoke(ctx, "/master_pb.Seaweed/RaftAddServer", in, out, opts...)
  213. if err != nil {
  214. return nil, err
  215. }
  216. return out, nil
  217. }
  218. func (c *seaweedClient) RaftRemoveServer(ctx context.Context, in *RaftRemoveServerRequest, opts ...grpc.CallOption) (*RaftRemoveServerResponse, error) {
  219. out := new(RaftRemoveServerResponse)
  220. err := c.cc.Invoke(ctx, "/master_pb.Seaweed/RaftRemoveServer", in, out, opts...)
  221. if err != nil {
  222. return nil, err
  223. }
  224. return out, nil
  225. }
  226. // SeaweedServer is the server API for Seaweed service.
  227. // All implementations must embed UnimplementedSeaweedServer
  228. // for forward compatibility
  229. type SeaweedServer interface {
  230. SendHeartbeat(Seaweed_SendHeartbeatServer) error
  231. KeepConnected(Seaweed_KeepConnectedServer) error
  232. LookupVolume(context.Context, *LookupVolumeRequest) (*LookupVolumeResponse, error)
  233. Assign(context.Context, *AssignRequest) (*AssignResponse, error)
  234. Statistics(context.Context, *StatisticsRequest) (*StatisticsResponse, error)
  235. CollectionList(context.Context, *CollectionListRequest) (*CollectionListResponse, error)
  236. CollectionDelete(context.Context, *CollectionDeleteRequest) (*CollectionDeleteResponse, error)
  237. VolumeList(context.Context, *VolumeListRequest) (*VolumeListResponse, error)
  238. LookupEcVolume(context.Context, *LookupEcVolumeRequest) (*LookupEcVolumeResponse, error)
  239. VacuumVolume(context.Context, *VacuumVolumeRequest) (*VacuumVolumeResponse, error)
  240. GetMasterConfiguration(context.Context, *GetMasterConfigurationRequest) (*GetMasterConfigurationResponse, error)
  241. ListClusterNodes(context.Context, *ListClusterNodesRequest) (*ListClusterNodesResponse, error)
  242. LeaseAdminToken(context.Context, *LeaseAdminTokenRequest) (*LeaseAdminTokenResponse, error)
  243. ReleaseAdminToken(context.Context, *ReleaseAdminTokenRequest) (*ReleaseAdminTokenResponse, error)
  244. Ping(context.Context, *PingRequest) (*PingResponse, error)
  245. RaftListClusterServers(context.Context, *RaftListClusterServersRequest) (*RaftListClusterServersResponse, error)
  246. RaftAddServer(context.Context, *RaftAddServerRequest) (*RaftAddServerResponse, error)
  247. RaftRemoveServer(context.Context, *RaftRemoveServerRequest) (*RaftRemoveServerResponse, error)
  248. mustEmbedUnimplementedSeaweedServer()
  249. }
  250. // UnimplementedSeaweedServer must be embedded to have forward compatible implementations.
  251. type UnimplementedSeaweedServer struct {
  252. }
  253. func (UnimplementedSeaweedServer) SendHeartbeat(Seaweed_SendHeartbeatServer) error {
  254. return status.Errorf(codes.Unimplemented, "method SendHeartbeat not implemented")
  255. }
  256. func (UnimplementedSeaweedServer) KeepConnected(Seaweed_KeepConnectedServer) error {
  257. return status.Errorf(codes.Unimplemented, "method KeepConnected not implemented")
  258. }
  259. func (UnimplementedSeaweedServer) LookupVolume(context.Context, *LookupVolumeRequest) (*LookupVolumeResponse, error) {
  260. return nil, status.Errorf(codes.Unimplemented, "method LookupVolume not implemented")
  261. }
  262. func (UnimplementedSeaweedServer) Assign(context.Context, *AssignRequest) (*AssignResponse, error) {
  263. return nil, status.Errorf(codes.Unimplemented, "method Assign not implemented")
  264. }
  265. func (UnimplementedSeaweedServer) Statistics(context.Context, *StatisticsRequest) (*StatisticsResponse, error) {
  266. return nil, status.Errorf(codes.Unimplemented, "method Statistics not implemented")
  267. }
  268. func (UnimplementedSeaweedServer) CollectionList(context.Context, *CollectionListRequest) (*CollectionListResponse, error) {
  269. return nil, status.Errorf(codes.Unimplemented, "method CollectionList not implemented")
  270. }
  271. func (UnimplementedSeaweedServer) CollectionDelete(context.Context, *CollectionDeleteRequest) (*CollectionDeleteResponse, error) {
  272. return nil, status.Errorf(codes.Unimplemented, "method CollectionDelete not implemented")
  273. }
  274. func (UnimplementedSeaweedServer) VolumeList(context.Context, *VolumeListRequest) (*VolumeListResponse, error) {
  275. return nil, status.Errorf(codes.Unimplemented, "method VolumeList not implemented")
  276. }
  277. func (UnimplementedSeaweedServer) LookupEcVolume(context.Context, *LookupEcVolumeRequest) (*LookupEcVolumeResponse, error) {
  278. return nil, status.Errorf(codes.Unimplemented, "method LookupEcVolume not implemented")
  279. }
  280. func (UnimplementedSeaweedServer) VacuumVolume(context.Context, *VacuumVolumeRequest) (*VacuumVolumeResponse, error) {
  281. return nil, status.Errorf(codes.Unimplemented, "method VacuumVolume not implemented")
  282. }
  283. func (UnimplementedSeaweedServer) GetMasterConfiguration(context.Context, *GetMasterConfigurationRequest) (*GetMasterConfigurationResponse, error) {
  284. return nil, status.Errorf(codes.Unimplemented, "method GetMasterConfiguration not implemented")
  285. }
  286. func (UnimplementedSeaweedServer) ListClusterNodes(context.Context, *ListClusterNodesRequest) (*ListClusterNodesResponse, error) {
  287. return nil, status.Errorf(codes.Unimplemented, "method ListClusterNodes not implemented")
  288. }
  289. func (UnimplementedSeaweedServer) LeaseAdminToken(context.Context, *LeaseAdminTokenRequest) (*LeaseAdminTokenResponse, error) {
  290. return nil, status.Errorf(codes.Unimplemented, "method LeaseAdminToken not implemented")
  291. }
  292. func (UnimplementedSeaweedServer) ReleaseAdminToken(context.Context, *ReleaseAdminTokenRequest) (*ReleaseAdminTokenResponse, error) {
  293. return nil, status.Errorf(codes.Unimplemented, "method ReleaseAdminToken not implemented")
  294. }
  295. func (UnimplementedSeaweedServer) Ping(context.Context, *PingRequest) (*PingResponse, error) {
  296. return nil, status.Errorf(codes.Unimplemented, "method Ping not implemented")
  297. }
  298. func (UnimplementedSeaweedServer) RaftListClusterServers(context.Context, *RaftListClusterServersRequest) (*RaftListClusterServersResponse, error) {
  299. return nil, status.Errorf(codes.Unimplemented, "method RaftListClusterServers not implemented")
  300. }
  301. func (UnimplementedSeaweedServer) RaftAddServer(context.Context, *RaftAddServerRequest) (*RaftAddServerResponse, error) {
  302. return nil, status.Errorf(codes.Unimplemented, "method RaftAddServer not implemented")
  303. }
  304. func (UnimplementedSeaweedServer) RaftRemoveServer(context.Context, *RaftRemoveServerRequest) (*RaftRemoveServerResponse, error) {
  305. return nil, status.Errorf(codes.Unimplemented, "method RaftRemoveServer not implemented")
  306. }
  307. func (UnimplementedSeaweedServer) mustEmbedUnimplementedSeaweedServer() {}
  308. // UnsafeSeaweedServer may be embedded to opt out of forward compatibility for this service.
  309. // Use of this interface is not recommended, as added methods to SeaweedServer will
  310. // result in compilation errors.
  311. type UnsafeSeaweedServer interface {
  312. mustEmbedUnimplementedSeaweedServer()
  313. }
  314. func RegisterSeaweedServer(s grpc.ServiceRegistrar, srv SeaweedServer) {
  315. s.RegisterService(&Seaweed_ServiceDesc, srv)
  316. }
  317. func _Seaweed_SendHeartbeat_Handler(srv interface{}, stream grpc.ServerStream) error {
  318. return srv.(SeaweedServer).SendHeartbeat(&seaweedSendHeartbeatServer{stream})
  319. }
  320. type Seaweed_SendHeartbeatServer interface {
  321. Send(*HeartbeatResponse) error
  322. Recv() (*Heartbeat, error)
  323. grpc.ServerStream
  324. }
  325. type seaweedSendHeartbeatServer struct {
  326. grpc.ServerStream
  327. }
  328. func (x *seaweedSendHeartbeatServer) Send(m *HeartbeatResponse) error {
  329. return x.ServerStream.SendMsg(m)
  330. }
  331. func (x *seaweedSendHeartbeatServer) Recv() (*Heartbeat, error) {
  332. m := new(Heartbeat)
  333. if err := x.ServerStream.RecvMsg(m); err != nil {
  334. return nil, err
  335. }
  336. return m, nil
  337. }
  338. func _Seaweed_KeepConnected_Handler(srv interface{}, stream grpc.ServerStream) error {
  339. return srv.(SeaweedServer).KeepConnected(&seaweedKeepConnectedServer{stream})
  340. }
  341. type Seaweed_KeepConnectedServer interface {
  342. Send(*KeepConnectedResponse) error
  343. Recv() (*KeepConnectedRequest, error)
  344. grpc.ServerStream
  345. }
  346. type seaweedKeepConnectedServer struct {
  347. grpc.ServerStream
  348. }
  349. func (x *seaweedKeepConnectedServer) Send(m *KeepConnectedResponse) error {
  350. return x.ServerStream.SendMsg(m)
  351. }
  352. func (x *seaweedKeepConnectedServer) Recv() (*KeepConnectedRequest, error) {
  353. m := new(KeepConnectedRequest)
  354. if err := x.ServerStream.RecvMsg(m); err != nil {
  355. return nil, err
  356. }
  357. return m, nil
  358. }
  359. func _Seaweed_LookupVolume_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  360. in := new(LookupVolumeRequest)
  361. if err := dec(in); err != nil {
  362. return nil, err
  363. }
  364. if interceptor == nil {
  365. return srv.(SeaweedServer).LookupVolume(ctx, in)
  366. }
  367. info := &grpc.UnaryServerInfo{
  368. Server: srv,
  369. FullMethod: "/master_pb.Seaweed/LookupVolume",
  370. }
  371. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  372. return srv.(SeaweedServer).LookupVolume(ctx, req.(*LookupVolumeRequest))
  373. }
  374. return interceptor(ctx, in, info, handler)
  375. }
  376. func _Seaweed_Assign_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  377. in := new(AssignRequest)
  378. if err := dec(in); err != nil {
  379. return nil, err
  380. }
  381. if interceptor == nil {
  382. return srv.(SeaweedServer).Assign(ctx, in)
  383. }
  384. info := &grpc.UnaryServerInfo{
  385. Server: srv,
  386. FullMethod: "/master_pb.Seaweed/Assign",
  387. }
  388. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  389. return srv.(SeaweedServer).Assign(ctx, req.(*AssignRequest))
  390. }
  391. return interceptor(ctx, in, info, handler)
  392. }
  393. func _Seaweed_Statistics_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  394. in := new(StatisticsRequest)
  395. if err := dec(in); err != nil {
  396. return nil, err
  397. }
  398. if interceptor == nil {
  399. return srv.(SeaweedServer).Statistics(ctx, in)
  400. }
  401. info := &grpc.UnaryServerInfo{
  402. Server: srv,
  403. FullMethod: "/master_pb.Seaweed/Statistics",
  404. }
  405. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  406. return srv.(SeaweedServer).Statistics(ctx, req.(*StatisticsRequest))
  407. }
  408. return interceptor(ctx, in, info, handler)
  409. }
  410. func _Seaweed_CollectionList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  411. in := new(CollectionListRequest)
  412. if err := dec(in); err != nil {
  413. return nil, err
  414. }
  415. if interceptor == nil {
  416. return srv.(SeaweedServer).CollectionList(ctx, in)
  417. }
  418. info := &grpc.UnaryServerInfo{
  419. Server: srv,
  420. FullMethod: "/master_pb.Seaweed/CollectionList",
  421. }
  422. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  423. return srv.(SeaweedServer).CollectionList(ctx, req.(*CollectionListRequest))
  424. }
  425. return interceptor(ctx, in, info, handler)
  426. }
  427. func _Seaweed_CollectionDelete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  428. in := new(CollectionDeleteRequest)
  429. if err := dec(in); err != nil {
  430. return nil, err
  431. }
  432. if interceptor == nil {
  433. return srv.(SeaweedServer).CollectionDelete(ctx, in)
  434. }
  435. info := &grpc.UnaryServerInfo{
  436. Server: srv,
  437. FullMethod: "/master_pb.Seaweed/CollectionDelete",
  438. }
  439. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  440. return srv.(SeaweedServer).CollectionDelete(ctx, req.(*CollectionDeleteRequest))
  441. }
  442. return interceptor(ctx, in, info, handler)
  443. }
  444. func _Seaweed_VolumeList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  445. in := new(VolumeListRequest)
  446. if err := dec(in); err != nil {
  447. return nil, err
  448. }
  449. if interceptor == nil {
  450. return srv.(SeaweedServer).VolumeList(ctx, in)
  451. }
  452. info := &grpc.UnaryServerInfo{
  453. Server: srv,
  454. FullMethod: "/master_pb.Seaweed/VolumeList",
  455. }
  456. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  457. return srv.(SeaweedServer).VolumeList(ctx, req.(*VolumeListRequest))
  458. }
  459. return interceptor(ctx, in, info, handler)
  460. }
  461. func _Seaweed_LookupEcVolume_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  462. in := new(LookupEcVolumeRequest)
  463. if err := dec(in); err != nil {
  464. return nil, err
  465. }
  466. if interceptor == nil {
  467. return srv.(SeaweedServer).LookupEcVolume(ctx, in)
  468. }
  469. info := &grpc.UnaryServerInfo{
  470. Server: srv,
  471. FullMethod: "/master_pb.Seaweed/LookupEcVolume",
  472. }
  473. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  474. return srv.(SeaweedServer).LookupEcVolume(ctx, req.(*LookupEcVolumeRequest))
  475. }
  476. return interceptor(ctx, in, info, handler)
  477. }
  478. func _Seaweed_VacuumVolume_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  479. in := new(VacuumVolumeRequest)
  480. if err := dec(in); err != nil {
  481. return nil, err
  482. }
  483. if interceptor == nil {
  484. return srv.(SeaweedServer).VacuumVolume(ctx, in)
  485. }
  486. info := &grpc.UnaryServerInfo{
  487. Server: srv,
  488. FullMethod: "/master_pb.Seaweed/VacuumVolume",
  489. }
  490. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  491. return srv.(SeaweedServer).VacuumVolume(ctx, req.(*VacuumVolumeRequest))
  492. }
  493. return interceptor(ctx, in, info, handler)
  494. }
  495. func _Seaweed_GetMasterConfiguration_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  496. in := new(GetMasterConfigurationRequest)
  497. if err := dec(in); err != nil {
  498. return nil, err
  499. }
  500. if interceptor == nil {
  501. return srv.(SeaweedServer).GetMasterConfiguration(ctx, in)
  502. }
  503. info := &grpc.UnaryServerInfo{
  504. Server: srv,
  505. FullMethod: "/master_pb.Seaweed/GetMasterConfiguration",
  506. }
  507. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  508. return srv.(SeaweedServer).GetMasterConfiguration(ctx, req.(*GetMasterConfigurationRequest))
  509. }
  510. return interceptor(ctx, in, info, handler)
  511. }
  512. func _Seaweed_ListClusterNodes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  513. in := new(ListClusterNodesRequest)
  514. if err := dec(in); err != nil {
  515. return nil, err
  516. }
  517. if interceptor == nil {
  518. return srv.(SeaweedServer).ListClusterNodes(ctx, in)
  519. }
  520. info := &grpc.UnaryServerInfo{
  521. Server: srv,
  522. FullMethod: "/master_pb.Seaweed/ListClusterNodes",
  523. }
  524. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  525. return srv.(SeaweedServer).ListClusterNodes(ctx, req.(*ListClusterNodesRequest))
  526. }
  527. return interceptor(ctx, in, info, handler)
  528. }
  529. func _Seaweed_LeaseAdminToken_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  530. in := new(LeaseAdminTokenRequest)
  531. if err := dec(in); err != nil {
  532. return nil, err
  533. }
  534. if interceptor == nil {
  535. return srv.(SeaweedServer).LeaseAdminToken(ctx, in)
  536. }
  537. info := &grpc.UnaryServerInfo{
  538. Server: srv,
  539. FullMethod: "/master_pb.Seaweed/LeaseAdminToken",
  540. }
  541. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  542. return srv.(SeaweedServer).LeaseAdminToken(ctx, req.(*LeaseAdminTokenRequest))
  543. }
  544. return interceptor(ctx, in, info, handler)
  545. }
  546. func _Seaweed_ReleaseAdminToken_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  547. in := new(ReleaseAdminTokenRequest)
  548. if err := dec(in); err != nil {
  549. return nil, err
  550. }
  551. if interceptor == nil {
  552. return srv.(SeaweedServer).ReleaseAdminToken(ctx, in)
  553. }
  554. info := &grpc.UnaryServerInfo{
  555. Server: srv,
  556. FullMethod: "/master_pb.Seaweed/ReleaseAdminToken",
  557. }
  558. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  559. return srv.(SeaweedServer).ReleaseAdminToken(ctx, req.(*ReleaseAdminTokenRequest))
  560. }
  561. return interceptor(ctx, in, info, handler)
  562. }
  563. func _Seaweed_Ping_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  564. in := new(PingRequest)
  565. if err := dec(in); err != nil {
  566. return nil, err
  567. }
  568. if interceptor == nil {
  569. return srv.(SeaweedServer).Ping(ctx, in)
  570. }
  571. info := &grpc.UnaryServerInfo{
  572. Server: srv,
  573. FullMethod: "/master_pb.Seaweed/Ping",
  574. }
  575. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  576. return srv.(SeaweedServer).Ping(ctx, req.(*PingRequest))
  577. }
  578. return interceptor(ctx, in, info, handler)
  579. }
  580. func _Seaweed_RaftListClusterServers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  581. in := new(RaftListClusterServersRequest)
  582. if err := dec(in); err != nil {
  583. return nil, err
  584. }
  585. if interceptor == nil {
  586. return srv.(SeaweedServer).RaftListClusterServers(ctx, in)
  587. }
  588. info := &grpc.UnaryServerInfo{
  589. Server: srv,
  590. FullMethod: "/master_pb.Seaweed/RaftListClusterServers",
  591. }
  592. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  593. return srv.(SeaweedServer).RaftListClusterServers(ctx, req.(*RaftListClusterServersRequest))
  594. }
  595. return interceptor(ctx, in, info, handler)
  596. }
  597. func _Seaweed_RaftAddServer_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  598. in := new(RaftAddServerRequest)
  599. if err := dec(in); err != nil {
  600. return nil, err
  601. }
  602. if interceptor == nil {
  603. return srv.(SeaweedServer).RaftAddServer(ctx, in)
  604. }
  605. info := &grpc.UnaryServerInfo{
  606. Server: srv,
  607. FullMethod: "/master_pb.Seaweed/RaftAddServer",
  608. }
  609. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  610. return srv.(SeaweedServer).RaftAddServer(ctx, req.(*RaftAddServerRequest))
  611. }
  612. return interceptor(ctx, in, info, handler)
  613. }
  614. func _Seaweed_RaftRemoveServer_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  615. in := new(RaftRemoveServerRequest)
  616. if err := dec(in); err != nil {
  617. return nil, err
  618. }
  619. if interceptor == nil {
  620. return srv.(SeaweedServer).RaftRemoveServer(ctx, in)
  621. }
  622. info := &grpc.UnaryServerInfo{
  623. Server: srv,
  624. FullMethod: "/master_pb.Seaweed/RaftRemoveServer",
  625. }
  626. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  627. return srv.(SeaweedServer).RaftRemoveServer(ctx, req.(*RaftRemoveServerRequest))
  628. }
  629. return interceptor(ctx, in, info, handler)
  630. }
  631. // Seaweed_ServiceDesc is the grpc.ServiceDesc for Seaweed service.
  632. // It's only intended for direct use with grpc.RegisterService,
  633. // and not to be introspected or modified (even as a copy)
  634. var Seaweed_ServiceDesc = grpc.ServiceDesc{
  635. ServiceName: "master_pb.Seaweed",
  636. HandlerType: (*SeaweedServer)(nil),
  637. Methods: []grpc.MethodDesc{
  638. {
  639. MethodName: "LookupVolume",
  640. Handler: _Seaweed_LookupVolume_Handler,
  641. },
  642. {
  643. MethodName: "Assign",
  644. Handler: _Seaweed_Assign_Handler,
  645. },
  646. {
  647. MethodName: "Statistics",
  648. Handler: _Seaweed_Statistics_Handler,
  649. },
  650. {
  651. MethodName: "CollectionList",
  652. Handler: _Seaweed_CollectionList_Handler,
  653. },
  654. {
  655. MethodName: "CollectionDelete",
  656. Handler: _Seaweed_CollectionDelete_Handler,
  657. },
  658. {
  659. MethodName: "VolumeList",
  660. Handler: _Seaweed_VolumeList_Handler,
  661. },
  662. {
  663. MethodName: "LookupEcVolume",
  664. Handler: _Seaweed_LookupEcVolume_Handler,
  665. },
  666. {
  667. MethodName: "VacuumVolume",
  668. Handler: _Seaweed_VacuumVolume_Handler,
  669. },
  670. {
  671. MethodName: "GetMasterConfiguration",
  672. Handler: _Seaweed_GetMasterConfiguration_Handler,
  673. },
  674. {
  675. MethodName: "ListClusterNodes",
  676. Handler: _Seaweed_ListClusterNodes_Handler,
  677. },
  678. {
  679. MethodName: "LeaseAdminToken",
  680. Handler: _Seaweed_LeaseAdminToken_Handler,
  681. },
  682. {
  683. MethodName: "ReleaseAdminToken",
  684. Handler: _Seaweed_ReleaseAdminToken_Handler,
  685. },
  686. {
  687. MethodName: "Ping",
  688. Handler: _Seaweed_Ping_Handler,
  689. },
  690. {
  691. MethodName: "RaftListClusterServers",
  692. Handler: _Seaweed_RaftListClusterServers_Handler,
  693. },
  694. {
  695. MethodName: "RaftAddServer",
  696. Handler: _Seaweed_RaftAddServer_Handler,
  697. },
  698. {
  699. MethodName: "RaftRemoveServer",
  700. Handler: _Seaweed_RaftRemoveServer_Handler,
  701. },
  702. },
  703. Streams: []grpc.StreamDesc{
  704. {
  705. StreamName: "SendHeartbeat",
  706. Handler: _Seaweed_SendHeartbeat_Handler,
  707. ServerStreams: true,
  708. ClientStreams: true,
  709. },
  710. {
  711. StreamName: "KeepConnected",
  712. Handler: _Seaweed_KeepConnected_Handler,
  713. ServerStreams: true,
  714. ClientStreams: true,
  715. },
  716. },
  717. Metadata: "master.proto",
  718. }