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.

890 lines
34 KiB

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