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.

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