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.

914 lines
35 KiB

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