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.

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