master_grpc.pb.go 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634
  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. GetMasterConfiguration(ctx context.Context, in *GetMasterConfigurationRequest, opts ...grpc.CallOption) (*GetMasterConfigurationResponse, error)
  28. ListClusterNodes(ctx context.Context, in *ListClusterNodesRequest, opts ...grpc.CallOption) (*ListClusterNodesResponse, error)
  29. LeaseAdminToken(ctx context.Context, in *LeaseAdminTokenRequest, opts ...grpc.CallOption) (*LeaseAdminTokenResponse, error)
  30. ReleaseAdminToken(ctx context.Context, in *ReleaseAdminTokenRequest, opts ...grpc.CallOption) (*ReleaseAdminTokenResponse, error)
  31. }
  32. type seaweedClient struct {
  33. cc grpc.ClientConnInterface
  34. }
  35. func NewSeaweedClient(cc grpc.ClientConnInterface) SeaweedClient {
  36. return &seaweedClient{cc}
  37. }
  38. func (c *seaweedClient) SendHeartbeat(ctx context.Context, opts ...grpc.CallOption) (Seaweed_SendHeartbeatClient, error) {
  39. stream, err := c.cc.NewStream(ctx, &Seaweed_ServiceDesc.Streams[0], "/master_pb.Seaweed/SendHeartbeat", opts...)
  40. if err != nil {
  41. return nil, err
  42. }
  43. x := &seaweedSendHeartbeatClient{stream}
  44. return x, nil
  45. }
  46. type Seaweed_SendHeartbeatClient interface {
  47. Send(*Heartbeat) error
  48. Recv() (*HeartbeatResponse, error)
  49. grpc.ClientStream
  50. }
  51. type seaweedSendHeartbeatClient struct {
  52. grpc.ClientStream
  53. }
  54. func (x *seaweedSendHeartbeatClient) Send(m *Heartbeat) error {
  55. return x.ClientStream.SendMsg(m)
  56. }
  57. func (x *seaweedSendHeartbeatClient) Recv() (*HeartbeatResponse, error) {
  58. m := new(HeartbeatResponse)
  59. if err := x.ClientStream.RecvMsg(m); err != nil {
  60. return nil, err
  61. }
  62. return m, nil
  63. }
  64. func (c *seaweedClient) KeepConnected(ctx context.Context, opts ...grpc.CallOption) (Seaweed_KeepConnectedClient, error) {
  65. stream, err := c.cc.NewStream(ctx, &Seaweed_ServiceDesc.Streams[1], "/master_pb.Seaweed/KeepConnected", opts...)
  66. if err != nil {
  67. return nil, err
  68. }
  69. x := &seaweedKeepConnectedClient{stream}
  70. return x, nil
  71. }
  72. type Seaweed_KeepConnectedClient interface {
  73. Send(*KeepConnectedRequest) error
  74. Recv() (*KeepConnectedResponse, error)
  75. grpc.ClientStream
  76. }
  77. type seaweedKeepConnectedClient struct {
  78. grpc.ClientStream
  79. }
  80. func (x *seaweedKeepConnectedClient) Send(m *KeepConnectedRequest) error {
  81. return x.ClientStream.SendMsg(m)
  82. }
  83. func (x *seaweedKeepConnectedClient) Recv() (*KeepConnectedResponse, error) {
  84. m := new(KeepConnectedResponse)
  85. if err := x.ClientStream.RecvMsg(m); err != nil {
  86. return nil, err
  87. }
  88. return m, nil
  89. }
  90. func (c *seaweedClient) LookupVolume(ctx context.Context, in *LookupVolumeRequest, opts ...grpc.CallOption) (*LookupVolumeResponse, error) {
  91. out := new(LookupVolumeResponse)
  92. err := c.cc.Invoke(ctx, "/master_pb.Seaweed/LookupVolume", in, out, opts...)
  93. if err != nil {
  94. return nil, err
  95. }
  96. return out, nil
  97. }
  98. func (c *seaweedClient) Assign(ctx context.Context, in *AssignRequest, opts ...grpc.CallOption) (*AssignResponse, error) {
  99. out := new(AssignResponse)
  100. err := c.cc.Invoke(ctx, "/master_pb.Seaweed/Assign", in, out, opts...)
  101. if err != nil {
  102. return nil, err
  103. }
  104. return out, nil
  105. }
  106. func (c *seaweedClient) Statistics(ctx context.Context, in *StatisticsRequest, opts ...grpc.CallOption) (*StatisticsResponse, error) {
  107. out := new(StatisticsResponse)
  108. err := c.cc.Invoke(ctx, "/master_pb.Seaweed/Statistics", in, out, opts...)
  109. if err != nil {
  110. return nil, err
  111. }
  112. return out, nil
  113. }
  114. func (c *seaweedClient) CollectionList(ctx context.Context, in *CollectionListRequest, opts ...grpc.CallOption) (*CollectionListResponse, error) {
  115. out := new(CollectionListResponse)
  116. err := c.cc.Invoke(ctx, "/master_pb.Seaweed/CollectionList", in, out, opts...)
  117. if err != nil {
  118. return nil, err
  119. }
  120. return out, nil
  121. }
  122. func (c *seaweedClient) CollectionDelete(ctx context.Context, in *CollectionDeleteRequest, opts ...grpc.CallOption) (*CollectionDeleteResponse, error) {
  123. out := new(CollectionDeleteResponse)
  124. err := c.cc.Invoke(ctx, "/master_pb.Seaweed/CollectionDelete", in, out, opts...)
  125. if err != nil {
  126. return nil, err
  127. }
  128. return out, nil
  129. }
  130. func (c *seaweedClient) VolumeList(ctx context.Context, in *VolumeListRequest, opts ...grpc.CallOption) (*VolumeListResponse, error) {
  131. out := new(VolumeListResponse)
  132. err := c.cc.Invoke(ctx, "/master_pb.Seaweed/VolumeList", in, out, opts...)
  133. if err != nil {
  134. return nil, err
  135. }
  136. return out, nil
  137. }
  138. func (c *seaweedClient) LookupEcVolume(ctx context.Context, in *LookupEcVolumeRequest, opts ...grpc.CallOption) (*LookupEcVolumeResponse, error) {
  139. out := new(LookupEcVolumeResponse)
  140. err := c.cc.Invoke(ctx, "/master_pb.Seaweed/LookupEcVolume", in, out, opts...)
  141. if err != nil {
  142. return nil, err
  143. }
  144. return out, nil
  145. }
  146. func (c *seaweedClient) VacuumVolume(ctx context.Context, in *VacuumVolumeRequest, opts ...grpc.CallOption) (*VacuumVolumeResponse, error) {
  147. out := new(VacuumVolumeResponse)
  148. err := c.cc.Invoke(ctx, "/master_pb.Seaweed/VacuumVolume", in, out, opts...)
  149. if err != nil {
  150. return nil, err
  151. }
  152. return out, nil
  153. }
  154. func (c *seaweedClient) GetMasterConfiguration(ctx context.Context, in *GetMasterConfigurationRequest, opts ...grpc.CallOption) (*GetMasterConfigurationResponse, error) {
  155. out := new(GetMasterConfigurationResponse)
  156. err := c.cc.Invoke(ctx, "/master_pb.Seaweed/GetMasterConfiguration", in, out, opts...)
  157. if err != nil {
  158. return nil, err
  159. }
  160. return out, nil
  161. }
  162. func (c *seaweedClient) ListClusterNodes(ctx context.Context, in *ListClusterNodesRequest, opts ...grpc.CallOption) (*ListClusterNodesResponse, error) {
  163. out := new(ListClusterNodesResponse)
  164. err := c.cc.Invoke(ctx, "/master_pb.Seaweed/ListClusterNodes", in, out, opts...)
  165. if err != nil {
  166. return nil, err
  167. }
  168. return out, nil
  169. }
  170. func (c *seaweedClient) LeaseAdminToken(ctx context.Context, in *LeaseAdminTokenRequest, opts ...grpc.CallOption) (*LeaseAdminTokenResponse, error) {
  171. out := new(LeaseAdminTokenResponse)
  172. err := c.cc.Invoke(ctx, "/master_pb.Seaweed/LeaseAdminToken", in, out, opts...)
  173. if err != nil {
  174. return nil, err
  175. }
  176. return out, nil
  177. }
  178. func (c *seaweedClient) ReleaseAdminToken(ctx context.Context, in *ReleaseAdminTokenRequest, opts ...grpc.CallOption) (*ReleaseAdminTokenResponse, error) {
  179. out := new(ReleaseAdminTokenResponse)
  180. err := c.cc.Invoke(ctx, "/master_pb.Seaweed/ReleaseAdminToken", in, out, opts...)
  181. if err != nil {
  182. return nil, err
  183. }
  184. return out, nil
  185. }
  186. // SeaweedServer is the server API for Seaweed service.
  187. // All implementations must embed UnimplementedSeaweedServer
  188. // for forward compatibility
  189. type SeaweedServer interface {
  190. SendHeartbeat(Seaweed_SendHeartbeatServer) error
  191. KeepConnected(Seaweed_KeepConnectedServer) error
  192. LookupVolume(context.Context, *LookupVolumeRequest) (*LookupVolumeResponse, error)
  193. Assign(context.Context, *AssignRequest) (*AssignResponse, error)
  194. Statistics(context.Context, *StatisticsRequest) (*StatisticsResponse, error)
  195. CollectionList(context.Context, *CollectionListRequest) (*CollectionListResponse, error)
  196. CollectionDelete(context.Context, *CollectionDeleteRequest) (*CollectionDeleteResponse, error)
  197. VolumeList(context.Context, *VolumeListRequest) (*VolumeListResponse, error)
  198. LookupEcVolume(context.Context, *LookupEcVolumeRequest) (*LookupEcVolumeResponse, error)
  199. VacuumVolume(context.Context, *VacuumVolumeRequest) (*VacuumVolumeResponse, error)
  200. GetMasterConfiguration(context.Context, *GetMasterConfigurationRequest) (*GetMasterConfigurationResponse, error)
  201. ListClusterNodes(context.Context, *ListClusterNodesRequest) (*ListClusterNodesResponse, error)
  202. LeaseAdminToken(context.Context, *LeaseAdminTokenRequest) (*LeaseAdminTokenResponse, error)
  203. ReleaseAdminToken(context.Context, *ReleaseAdminTokenRequest) (*ReleaseAdminTokenResponse, error)
  204. mustEmbedUnimplementedSeaweedServer()
  205. }
  206. // UnimplementedSeaweedServer must be embedded to have forward compatible implementations.
  207. type UnimplementedSeaweedServer struct {
  208. }
  209. func (UnimplementedSeaweedServer) SendHeartbeat(Seaweed_SendHeartbeatServer) error {
  210. return status.Errorf(codes.Unimplemented, "method SendHeartbeat not implemented")
  211. }
  212. func (UnimplementedSeaweedServer) KeepConnected(Seaweed_KeepConnectedServer) error {
  213. return status.Errorf(codes.Unimplemented, "method KeepConnected not implemented")
  214. }
  215. func (UnimplementedSeaweedServer) LookupVolume(context.Context, *LookupVolumeRequest) (*LookupVolumeResponse, error) {
  216. return nil, status.Errorf(codes.Unimplemented, "method LookupVolume not implemented")
  217. }
  218. func (UnimplementedSeaweedServer) Assign(context.Context, *AssignRequest) (*AssignResponse, error) {
  219. return nil, status.Errorf(codes.Unimplemented, "method Assign not implemented")
  220. }
  221. func (UnimplementedSeaweedServer) Statistics(context.Context, *StatisticsRequest) (*StatisticsResponse, error) {
  222. return nil, status.Errorf(codes.Unimplemented, "method Statistics not implemented")
  223. }
  224. func (UnimplementedSeaweedServer) CollectionList(context.Context, *CollectionListRequest) (*CollectionListResponse, error) {
  225. return nil, status.Errorf(codes.Unimplemented, "method CollectionList not implemented")
  226. }
  227. func (UnimplementedSeaweedServer) CollectionDelete(context.Context, *CollectionDeleteRequest) (*CollectionDeleteResponse, error) {
  228. return nil, status.Errorf(codes.Unimplemented, "method CollectionDelete not implemented")
  229. }
  230. func (UnimplementedSeaweedServer) VolumeList(context.Context, *VolumeListRequest) (*VolumeListResponse, error) {
  231. return nil, status.Errorf(codes.Unimplemented, "method VolumeList not implemented")
  232. }
  233. func (UnimplementedSeaweedServer) LookupEcVolume(context.Context, *LookupEcVolumeRequest) (*LookupEcVolumeResponse, error) {
  234. return nil, status.Errorf(codes.Unimplemented, "method LookupEcVolume not implemented")
  235. }
  236. func (UnimplementedSeaweedServer) VacuumVolume(context.Context, *VacuumVolumeRequest) (*VacuumVolumeResponse, error) {
  237. return nil, status.Errorf(codes.Unimplemented, "method VacuumVolume not implemented")
  238. }
  239. func (UnimplementedSeaweedServer) GetMasterConfiguration(context.Context, *GetMasterConfigurationRequest) (*GetMasterConfigurationResponse, error) {
  240. return nil, status.Errorf(codes.Unimplemented, "method GetMasterConfiguration not implemented")
  241. }
  242. func (UnimplementedSeaweedServer) ListClusterNodes(context.Context, *ListClusterNodesRequest) (*ListClusterNodesResponse, error) {
  243. return nil, status.Errorf(codes.Unimplemented, "method ListClusterNodes not implemented")
  244. }
  245. func (UnimplementedSeaweedServer) LeaseAdminToken(context.Context, *LeaseAdminTokenRequest) (*LeaseAdminTokenResponse, error) {
  246. return nil, status.Errorf(codes.Unimplemented, "method LeaseAdminToken not implemented")
  247. }
  248. func (UnimplementedSeaweedServer) ReleaseAdminToken(context.Context, *ReleaseAdminTokenRequest) (*ReleaseAdminTokenResponse, error) {
  249. return nil, status.Errorf(codes.Unimplemented, "method ReleaseAdminToken not implemented")
  250. }
  251. func (UnimplementedSeaweedServer) mustEmbedUnimplementedSeaweedServer() {}
  252. // UnsafeSeaweedServer may be embedded to opt out of forward compatibility for this service.
  253. // Use of this interface is not recommended, as added methods to SeaweedServer will
  254. // result in compilation errors.
  255. type UnsafeSeaweedServer interface {
  256. mustEmbedUnimplementedSeaweedServer()
  257. }
  258. func RegisterSeaweedServer(s grpc.ServiceRegistrar, srv SeaweedServer) {
  259. s.RegisterService(&Seaweed_ServiceDesc, srv)
  260. }
  261. func _Seaweed_SendHeartbeat_Handler(srv interface{}, stream grpc.ServerStream) error {
  262. return srv.(SeaweedServer).SendHeartbeat(&seaweedSendHeartbeatServer{stream})
  263. }
  264. type Seaweed_SendHeartbeatServer interface {
  265. Send(*HeartbeatResponse) error
  266. Recv() (*Heartbeat, error)
  267. grpc.ServerStream
  268. }
  269. type seaweedSendHeartbeatServer struct {
  270. grpc.ServerStream
  271. }
  272. func (x *seaweedSendHeartbeatServer) Send(m *HeartbeatResponse) error {
  273. return x.ServerStream.SendMsg(m)
  274. }
  275. func (x *seaweedSendHeartbeatServer) Recv() (*Heartbeat, error) {
  276. m := new(Heartbeat)
  277. if err := x.ServerStream.RecvMsg(m); err != nil {
  278. return nil, err
  279. }
  280. return m, nil
  281. }
  282. func _Seaweed_KeepConnected_Handler(srv interface{}, stream grpc.ServerStream) error {
  283. return srv.(SeaweedServer).KeepConnected(&seaweedKeepConnectedServer{stream})
  284. }
  285. type Seaweed_KeepConnectedServer interface {
  286. Send(*KeepConnectedResponse) error
  287. Recv() (*KeepConnectedRequest, error)
  288. grpc.ServerStream
  289. }
  290. type seaweedKeepConnectedServer struct {
  291. grpc.ServerStream
  292. }
  293. func (x *seaweedKeepConnectedServer) Send(m *KeepConnectedResponse) error {
  294. return x.ServerStream.SendMsg(m)
  295. }
  296. func (x *seaweedKeepConnectedServer) Recv() (*KeepConnectedRequest, error) {
  297. m := new(KeepConnectedRequest)
  298. if err := x.ServerStream.RecvMsg(m); err != nil {
  299. return nil, err
  300. }
  301. return m, nil
  302. }
  303. func _Seaweed_LookupVolume_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  304. in := new(LookupVolumeRequest)
  305. if err := dec(in); err != nil {
  306. return nil, err
  307. }
  308. if interceptor == nil {
  309. return srv.(SeaweedServer).LookupVolume(ctx, in)
  310. }
  311. info := &grpc.UnaryServerInfo{
  312. Server: srv,
  313. FullMethod: "/master_pb.Seaweed/LookupVolume",
  314. }
  315. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  316. return srv.(SeaweedServer).LookupVolume(ctx, req.(*LookupVolumeRequest))
  317. }
  318. return interceptor(ctx, in, info, handler)
  319. }
  320. func _Seaweed_Assign_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  321. in := new(AssignRequest)
  322. if err := dec(in); err != nil {
  323. return nil, err
  324. }
  325. if interceptor == nil {
  326. return srv.(SeaweedServer).Assign(ctx, in)
  327. }
  328. info := &grpc.UnaryServerInfo{
  329. Server: srv,
  330. FullMethod: "/master_pb.Seaweed/Assign",
  331. }
  332. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  333. return srv.(SeaweedServer).Assign(ctx, req.(*AssignRequest))
  334. }
  335. return interceptor(ctx, in, info, handler)
  336. }
  337. func _Seaweed_Statistics_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  338. in := new(StatisticsRequest)
  339. if err := dec(in); err != nil {
  340. return nil, err
  341. }
  342. if interceptor == nil {
  343. return srv.(SeaweedServer).Statistics(ctx, in)
  344. }
  345. info := &grpc.UnaryServerInfo{
  346. Server: srv,
  347. FullMethod: "/master_pb.Seaweed/Statistics",
  348. }
  349. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  350. return srv.(SeaweedServer).Statistics(ctx, req.(*StatisticsRequest))
  351. }
  352. return interceptor(ctx, in, info, handler)
  353. }
  354. func _Seaweed_CollectionList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  355. in := new(CollectionListRequest)
  356. if err := dec(in); err != nil {
  357. return nil, err
  358. }
  359. if interceptor == nil {
  360. return srv.(SeaweedServer).CollectionList(ctx, in)
  361. }
  362. info := &grpc.UnaryServerInfo{
  363. Server: srv,
  364. FullMethod: "/master_pb.Seaweed/CollectionList",
  365. }
  366. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  367. return srv.(SeaweedServer).CollectionList(ctx, req.(*CollectionListRequest))
  368. }
  369. return interceptor(ctx, in, info, handler)
  370. }
  371. func _Seaweed_CollectionDelete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  372. in := new(CollectionDeleteRequest)
  373. if err := dec(in); err != nil {
  374. return nil, err
  375. }
  376. if interceptor == nil {
  377. return srv.(SeaweedServer).CollectionDelete(ctx, in)
  378. }
  379. info := &grpc.UnaryServerInfo{
  380. Server: srv,
  381. FullMethod: "/master_pb.Seaweed/CollectionDelete",
  382. }
  383. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  384. return srv.(SeaweedServer).CollectionDelete(ctx, req.(*CollectionDeleteRequest))
  385. }
  386. return interceptor(ctx, in, info, handler)
  387. }
  388. func _Seaweed_VolumeList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  389. in := new(VolumeListRequest)
  390. if err := dec(in); err != nil {
  391. return nil, err
  392. }
  393. if interceptor == nil {
  394. return srv.(SeaweedServer).VolumeList(ctx, in)
  395. }
  396. info := &grpc.UnaryServerInfo{
  397. Server: srv,
  398. FullMethod: "/master_pb.Seaweed/VolumeList",
  399. }
  400. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  401. return srv.(SeaweedServer).VolumeList(ctx, req.(*VolumeListRequest))
  402. }
  403. return interceptor(ctx, in, info, handler)
  404. }
  405. func _Seaweed_LookupEcVolume_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  406. in := new(LookupEcVolumeRequest)
  407. if err := dec(in); err != nil {
  408. return nil, err
  409. }
  410. if interceptor == nil {
  411. return srv.(SeaweedServer).LookupEcVolume(ctx, in)
  412. }
  413. info := &grpc.UnaryServerInfo{
  414. Server: srv,
  415. FullMethod: "/master_pb.Seaweed/LookupEcVolume",
  416. }
  417. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  418. return srv.(SeaweedServer).LookupEcVolume(ctx, req.(*LookupEcVolumeRequest))
  419. }
  420. return interceptor(ctx, in, info, handler)
  421. }
  422. func _Seaweed_VacuumVolume_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  423. in := new(VacuumVolumeRequest)
  424. if err := dec(in); err != nil {
  425. return nil, err
  426. }
  427. if interceptor == nil {
  428. return srv.(SeaweedServer).VacuumVolume(ctx, in)
  429. }
  430. info := &grpc.UnaryServerInfo{
  431. Server: srv,
  432. FullMethod: "/master_pb.Seaweed/VacuumVolume",
  433. }
  434. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  435. return srv.(SeaweedServer).VacuumVolume(ctx, req.(*VacuumVolumeRequest))
  436. }
  437. return interceptor(ctx, in, info, handler)
  438. }
  439. func _Seaweed_GetMasterConfiguration_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  440. in := new(GetMasterConfigurationRequest)
  441. if err := dec(in); err != nil {
  442. return nil, err
  443. }
  444. if interceptor == nil {
  445. return srv.(SeaweedServer).GetMasterConfiguration(ctx, in)
  446. }
  447. info := &grpc.UnaryServerInfo{
  448. Server: srv,
  449. FullMethod: "/master_pb.Seaweed/GetMasterConfiguration",
  450. }
  451. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  452. return srv.(SeaweedServer).GetMasterConfiguration(ctx, req.(*GetMasterConfigurationRequest))
  453. }
  454. return interceptor(ctx, in, info, handler)
  455. }
  456. func _Seaweed_ListClusterNodes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  457. in := new(ListClusterNodesRequest)
  458. if err := dec(in); err != nil {
  459. return nil, err
  460. }
  461. if interceptor == nil {
  462. return srv.(SeaweedServer).ListClusterNodes(ctx, in)
  463. }
  464. info := &grpc.UnaryServerInfo{
  465. Server: srv,
  466. FullMethod: "/master_pb.Seaweed/ListClusterNodes",
  467. }
  468. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  469. return srv.(SeaweedServer).ListClusterNodes(ctx, req.(*ListClusterNodesRequest))
  470. }
  471. return interceptor(ctx, in, info, handler)
  472. }
  473. func _Seaweed_LeaseAdminToken_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  474. in := new(LeaseAdminTokenRequest)
  475. if err := dec(in); err != nil {
  476. return nil, err
  477. }
  478. if interceptor == nil {
  479. return srv.(SeaweedServer).LeaseAdminToken(ctx, in)
  480. }
  481. info := &grpc.UnaryServerInfo{
  482. Server: srv,
  483. FullMethod: "/master_pb.Seaweed/LeaseAdminToken",
  484. }
  485. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  486. return srv.(SeaweedServer).LeaseAdminToken(ctx, req.(*LeaseAdminTokenRequest))
  487. }
  488. return interceptor(ctx, in, info, handler)
  489. }
  490. func _Seaweed_ReleaseAdminToken_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  491. in := new(ReleaseAdminTokenRequest)
  492. if err := dec(in); err != nil {
  493. return nil, err
  494. }
  495. if interceptor == nil {
  496. return srv.(SeaweedServer).ReleaseAdminToken(ctx, in)
  497. }
  498. info := &grpc.UnaryServerInfo{
  499. Server: srv,
  500. FullMethod: "/master_pb.Seaweed/ReleaseAdminToken",
  501. }
  502. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  503. return srv.(SeaweedServer).ReleaseAdminToken(ctx, req.(*ReleaseAdminTokenRequest))
  504. }
  505. return interceptor(ctx, in, info, handler)
  506. }
  507. // Seaweed_ServiceDesc is the grpc.ServiceDesc for Seaweed service.
  508. // It's only intended for direct use with grpc.RegisterService,
  509. // and not to be introspected or modified (even as a copy)
  510. var Seaweed_ServiceDesc = grpc.ServiceDesc{
  511. ServiceName: "master_pb.Seaweed",
  512. HandlerType: (*SeaweedServer)(nil),
  513. Methods: []grpc.MethodDesc{
  514. {
  515. MethodName: "LookupVolume",
  516. Handler: _Seaweed_LookupVolume_Handler,
  517. },
  518. {
  519. MethodName: "Assign",
  520. Handler: _Seaweed_Assign_Handler,
  521. },
  522. {
  523. MethodName: "Statistics",
  524. Handler: _Seaweed_Statistics_Handler,
  525. },
  526. {
  527. MethodName: "CollectionList",
  528. Handler: _Seaweed_CollectionList_Handler,
  529. },
  530. {
  531. MethodName: "CollectionDelete",
  532. Handler: _Seaweed_CollectionDelete_Handler,
  533. },
  534. {
  535. MethodName: "VolumeList",
  536. Handler: _Seaweed_VolumeList_Handler,
  537. },
  538. {
  539. MethodName: "LookupEcVolume",
  540. Handler: _Seaweed_LookupEcVolume_Handler,
  541. },
  542. {
  543. MethodName: "VacuumVolume",
  544. Handler: _Seaweed_VacuumVolume_Handler,
  545. },
  546. {
  547. MethodName: "GetMasterConfiguration",
  548. Handler: _Seaweed_GetMasterConfiguration_Handler,
  549. },
  550. {
  551. MethodName: "ListClusterNodes",
  552. Handler: _Seaweed_ListClusterNodes_Handler,
  553. },
  554. {
  555. MethodName: "LeaseAdminToken",
  556. Handler: _Seaweed_LeaseAdminToken_Handler,
  557. },
  558. {
  559. MethodName: "ReleaseAdminToken",
  560. Handler: _Seaweed_ReleaseAdminToken_Handler,
  561. },
  562. },
  563. Streams: []grpc.StreamDesc{
  564. {
  565. StreamName: "SendHeartbeat",
  566. Handler: _Seaweed_SendHeartbeat_Handler,
  567. ServerStreams: true,
  568. ClientStreams: true,
  569. },
  570. {
  571. StreamName: "KeepConnected",
  572. Handler: _Seaweed_KeepConnected_Handler,
  573. ServerStreams: true,
  574. ClientStreams: true,
  575. },
  576. },
  577. Metadata: "master.proto",
  578. }