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.

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