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.

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