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.

818 lines
31 KiB

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