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.

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