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.

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