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.

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