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.

670 lines
24 KiB

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