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.

1051 lines
47 KiB

1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
  1. // Code generated by protoc-gen-go-grpc. DO NOT EDIT.
  2. // versions:
  3. // - protoc-gen-go-grpc v1.5.1
  4. // - protoc v5.28.1
  5. // source: filer.proto
  6. package filer_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.64.0 or later.
  16. const _ = grpc.SupportPackageIsVersion9
  17. const (
  18. SeaweedFiler_LookupDirectoryEntry_FullMethodName = "/filer_pb.SeaweedFiler/LookupDirectoryEntry"
  19. SeaweedFiler_ListEntries_FullMethodName = "/filer_pb.SeaweedFiler/ListEntries"
  20. SeaweedFiler_CreateEntry_FullMethodName = "/filer_pb.SeaweedFiler/CreateEntry"
  21. SeaweedFiler_UpdateEntry_FullMethodName = "/filer_pb.SeaweedFiler/UpdateEntry"
  22. SeaweedFiler_AppendToEntry_FullMethodName = "/filer_pb.SeaweedFiler/AppendToEntry"
  23. SeaweedFiler_DeleteEntry_FullMethodName = "/filer_pb.SeaweedFiler/DeleteEntry"
  24. SeaweedFiler_AtomicRenameEntry_FullMethodName = "/filer_pb.SeaweedFiler/AtomicRenameEntry"
  25. SeaweedFiler_StreamRenameEntry_FullMethodName = "/filer_pb.SeaweedFiler/StreamRenameEntry"
  26. SeaweedFiler_AssignVolume_FullMethodName = "/filer_pb.SeaweedFiler/AssignVolume"
  27. SeaweedFiler_LookupVolume_FullMethodName = "/filer_pb.SeaweedFiler/LookupVolume"
  28. SeaweedFiler_CollectionList_FullMethodName = "/filer_pb.SeaweedFiler/CollectionList"
  29. SeaweedFiler_DeleteCollection_FullMethodName = "/filer_pb.SeaweedFiler/DeleteCollection"
  30. SeaweedFiler_Statistics_FullMethodName = "/filer_pb.SeaweedFiler/Statistics"
  31. SeaweedFiler_Ping_FullMethodName = "/filer_pb.SeaweedFiler/Ping"
  32. SeaweedFiler_GetFilerConfiguration_FullMethodName = "/filer_pb.SeaweedFiler/GetFilerConfiguration"
  33. SeaweedFiler_TraverseBfsMetadata_FullMethodName = "/filer_pb.SeaweedFiler/TraverseBfsMetadata"
  34. SeaweedFiler_SubscribeMetadata_FullMethodName = "/filer_pb.SeaweedFiler/SubscribeMetadata"
  35. SeaweedFiler_SubscribeLocalMetadata_FullMethodName = "/filer_pb.SeaweedFiler/SubscribeLocalMetadata"
  36. SeaweedFiler_KvGet_FullMethodName = "/filer_pb.SeaweedFiler/KvGet"
  37. SeaweedFiler_KvPut_FullMethodName = "/filer_pb.SeaweedFiler/KvPut"
  38. SeaweedFiler_CacheRemoteObjectToLocalCluster_FullMethodName = "/filer_pb.SeaweedFiler/CacheRemoteObjectToLocalCluster"
  39. SeaweedFiler_DistributedLock_FullMethodName = "/filer_pb.SeaweedFiler/DistributedLock"
  40. SeaweedFiler_DistributedUnlock_FullMethodName = "/filer_pb.SeaweedFiler/DistributedUnlock"
  41. SeaweedFiler_FindLockOwner_FullMethodName = "/filer_pb.SeaweedFiler/FindLockOwner"
  42. SeaweedFiler_TransferLocks_FullMethodName = "/filer_pb.SeaweedFiler/TransferLocks"
  43. )
  44. // SeaweedFilerClient is the client API for SeaweedFiler service.
  45. //
  46. // 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.
  47. type SeaweedFilerClient interface {
  48. LookupDirectoryEntry(ctx context.Context, in *LookupDirectoryEntryRequest, opts ...grpc.CallOption) (*LookupDirectoryEntryResponse, error)
  49. ListEntries(ctx context.Context, in *ListEntriesRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[ListEntriesResponse], error)
  50. CreateEntry(ctx context.Context, in *CreateEntryRequest, opts ...grpc.CallOption) (*CreateEntryResponse, error)
  51. UpdateEntry(ctx context.Context, in *UpdateEntryRequest, opts ...grpc.CallOption) (*UpdateEntryResponse, error)
  52. AppendToEntry(ctx context.Context, in *AppendToEntryRequest, opts ...grpc.CallOption) (*AppendToEntryResponse, error)
  53. DeleteEntry(ctx context.Context, in *DeleteEntryRequest, opts ...grpc.CallOption) (*DeleteEntryResponse, error)
  54. AtomicRenameEntry(ctx context.Context, in *AtomicRenameEntryRequest, opts ...grpc.CallOption) (*AtomicRenameEntryResponse, error)
  55. StreamRenameEntry(ctx context.Context, in *StreamRenameEntryRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[StreamRenameEntryResponse], error)
  56. AssignVolume(ctx context.Context, in *AssignVolumeRequest, opts ...grpc.CallOption) (*AssignVolumeResponse, error)
  57. LookupVolume(ctx context.Context, in *LookupVolumeRequest, opts ...grpc.CallOption) (*LookupVolumeResponse, error)
  58. CollectionList(ctx context.Context, in *CollectionListRequest, opts ...grpc.CallOption) (*CollectionListResponse, error)
  59. DeleteCollection(ctx context.Context, in *DeleteCollectionRequest, opts ...grpc.CallOption) (*DeleteCollectionResponse, error)
  60. Statistics(ctx context.Context, in *StatisticsRequest, opts ...grpc.CallOption) (*StatisticsResponse, error)
  61. Ping(ctx context.Context, in *PingRequest, opts ...grpc.CallOption) (*PingResponse, error)
  62. GetFilerConfiguration(ctx context.Context, in *GetFilerConfigurationRequest, opts ...grpc.CallOption) (*GetFilerConfigurationResponse, error)
  63. TraverseBfsMetadata(ctx context.Context, in *TraverseBfsMetadataRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[TraverseBfsMetadataResponse], error)
  64. SubscribeMetadata(ctx context.Context, in *SubscribeMetadataRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[SubscribeMetadataResponse], error)
  65. SubscribeLocalMetadata(ctx context.Context, in *SubscribeMetadataRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[SubscribeMetadataResponse], error)
  66. KvGet(ctx context.Context, in *KvGetRequest, opts ...grpc.CallOption) (*KvGetResponse, error)
  67. KvPut(ctx context.Context, in *KvPutRequest, opts ...grpc.CallOption) (*KvPutResponse, error)
  68. CacheRemoteObjectToLocalCluster(ctx context.Context, in *CacheRemoteObjectToLocalClusterRequest, opts ...grpc.CallOption) (*CacheRemoteObjectToLocalClusterResponse, error)
  69. DistributedLock(ctx context.Context, in *LockRequest, opts ...grpc.CallOption) (*LockResponse, error)
  70. DistributedUnlock(ctx context.Context, in *UnlockRequest, opts ...grpc.CallOption) (*UnlockResponse, error)
  71. FindLockOwner(ctx context.Context, in *FindLockOwnerRequest, opts ...grpc.CallOption) (*FindLockOwnerResponse, error)
  72. // distributed lock management internal use only
  73. TransferLocks(ctx context.Context, in *TransferLocksRequest, opts ...grpc.CallOption) (*TransferLocksResponse, error)
  74. }
  75. type seaweedFilerClient struct {
  76. cc grpc.ClientConnInterface
  77. }
  78. func NewSeaweedFilerClient(cc grpc.ClientConnInterface) SeaweedFilerClient {
  79. return &seaweedFilerClient{cc}
  80. }
  81. func (c *seaweedFilerClient) LookupDirectoryEntry(ctx context.Context, in *LookupDirectoryEntryRequest, opts ...grpc.CallOption) (*LookupDirectoryEntryResponse, error) {
  82. cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
  83. out := new(LookupDirectoryEntryResponse)
  84. err := c.cc.Invoke(ctx, SeaweedFiler_LookupDirectoryEntry_FullMethodName, in, out, cOpts...)
  85. if err != nil {
  86. return nil, err
  87. }
  88. return out, nil
  89. }
  90. func (c *seaweedFilerClient) ListEntries(ctx context.Context, in *ListEntriesRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[ListEntriesResponse], error) {
  91. cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
  92. stream, err := c.cc.NewStream(ctx, &SeaweedFiler_ServiceDesc.Streams[0], SeaweedFiler_ListEntries_FullMethodName, cOpts...)
  93. if err != nil {
  94. return nil, err
  95. }
  96. x := &grpc.GenericClientStream[ListEntriesRequest, ListEntriesResponse]{ClientStream: stream}
  97. if err := x.ClientStream.SendMsg(in); err != nil {
  98. return nil, err
  99. }
  100. if err := x.ClientStream.CloseSend(); err != nil {
  101. return nil, err
  102. }
  103. return x, nil
  104. }
  105. // This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
  106. type SeaweedFiler_ListEntriesClient = grpc.ServerStreamingClient[ListEntriesResponse]
  107. func (c *seaweedFilerClient) CreateEntry(ctx context.Context, in *CreateEntryRequest, opts ...grpc.CallOption) (*CreateEntryResponse, error) {
  108. cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
  109. out := new(CreateEntryResponse)
  110. err := c.cc.Invoke(ctx, SeaweedFiler_CreateEntry_FullMethodName, in, out, cOpts...)
  111. if err != nil {
  112. return nil, err
  113. }
  114. return out, nil
  115. }
  116. func (c *seaweedFilerClient) UpdateEntry(ctx context.Context, in *UpdateEntryRequest, opts ...grpc.CallOption) (*UpdateEntryResponse, error) {
  117. cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
  118. out := new(UpdateEntryResponse)
  119. err := c.cc.Invoke(ctx, SeaweedFiler_UpdateEntry_FullMethodName, in, out, cOpts...)
  120. if err != nil {
  121. return nil, err
  122. }
  123. return out, nil
  124. }
  125. func (c *seaweedFilerClient) AppendToEntry(ctx context.Context, in *AppendToEntryRequest, opts ...grpc.CallOption) (*AppendToEntryResponse, error) {
  126. cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
  127. out := new(AppendToEntryResponse)
  128. err := c.cc.Invoke(ctx, SeaweedFiler_AppendToEntry_FullMethodName, in, out, cOpts...)
  129. if err != nil {
  130. return nil, err
  131. }
  132. return out, nil
  133. }
  134. func (c *seaweedFilerClient) DeleteEntry(ctx context.Context, in *DeleteEntryRequest, opts ...grpc.CallOption) (*DeleteEntryResponse, error) {
  135. cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
  136. out := new(DeleteEntryResponse)
  137. err := c.cc.Invoke(ctx, SeaweedFiler_DeleteEntry_FullMethodName, in, out, cOpts...)
  138. if err != nil {
  139. return nil, err
  140. }
  141. return out, nil
  142. }
  143. func (c *seaweedFilerClient) AtomicRenameEntry(ctx context.Context, in *AtomicRenameEntryRequest, opts ...grpc.CallOption) (*AtomicRenameEntryResponse, error) {
  144. cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
  145. out := new(AtomicRenameEntryResponse)
  146. err := c.cc.Invoke(ctx, SeaweedFiler_AtomicRenameEntry_FullMethodName, in, out, cOpts...)
  147. if err != nil {
  148. return nil, err
  149. }
  150. return out, nil
  151. }
  152. func (c *seaweedFilerClient) StreamRenameEntry(ctx context.Context, in *StreamRenameEntryRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[StreamRenameEntryResponse], error) {
  153. cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
  154. stream, err := c.cc.NewStream(ctx, &SeaweedFiler_ServiceDesc.Streams[1], SeaweedFiler_StreamRenameEntry_FullMethodName, cOpts...)
  155. if err != nil {
  156. return nil, err
  157. }
  158. x := &grpc.GenericClientStream[StreamRenameEntryRequest, StreamRenameEntryResponse]{ClientStream: stream}
  159. if err := x.ClientStream.SendMsg(in); err != nil {
  160. return nil, err
  161. }
  162. if err := x.ClientStream.CloseSend(); err != nil {
  163. return nil, err
  164. }
  165. return x, nil
  166. }
  167. // This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
  168. type SeaweedFiler_StreamRenameEntryClient = grpc.ServerStreamingClient[StreamRenameEntryResponse]
  169. func (c *seaweedFilerClient) AssignVolume(ctx context.Context, in *AssignVolumeRequest, opts ...grpc.CallOption) (*AssignVolumeResponse, error) {
  170. cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
  171. out := new(AssignVolumeResponse)
  172. err := c.cc.Invoke(ctx, SeaweedFiler_AssignVolume_FullMethodName, in, out, cOpts...)
  173. if err != nil {
  174. return nil, err
  175. }
  176. return out, nil
  177. }
  178. func (c *seaweedFilerClient) LookupVolume(ctx context.Context, in *LookupVolumeRequest, opts ...grpc.CallOption) (*LookupVolumeResponse, error) {
  179. cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
  180. out := new(LookupVolumeResponse)
  181. err := c.cc.Invoke(ctx, SeaweedFiler_LookupVolume_FullMethodName, in, out, cOpts...)
  182. if err != nil {
  183. return nil, err
  184. }
  185. return out, nil
  186. }
  187. func (c *seaweedFilerClient) CollectionList(ctx context.Context, in *CollectionListRequest, opts ...grpc.CallOption) (*CollectionListResponse, error) {
  188. cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
  189. out := new(CollectionListResponse)
  190. err := c.cc.Invoke(ctx, SeaweedFiler_CollectionList_FullMethodName, in, out, cOpts...)
  191. if err != nil {
  192. return nil, err
  193. }
  194. return out, nil
  195. }
  196. func (c *seaweedFilerClient) DeleteCollection(ctx context.Context, in *DeleteCollectionRequest, opts ...grpc.CallOption) (*DeleteCollectionResponse, error) {
  197. cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
  198. out := new(DeleteCollectionResponse)
  199. err := c.cc.Invoke(ctx, SeaweedFiler_DeleteCollection_FullMethodName, in, out, cOpts...)
  200. if err != nil {
  201. return nil, err
  202. }
  203. return out, nil
  204. }
  205. func (c *seaweedFilerClient) Statistics(ctx context.Context, in *StatisticsRequest, opts ...grpc.CallOption) (*StatisticsResponse, error) {
  206. cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
  207. out := new(StatisticsResponse)
  208. err := c.cc.Invoke(ctx, SeaweedFiler_Statistics_FullMethodName, in, out, cOpts...)
  209. if err != nil {
  210. return nil, err
  211. }
  212. return out, nil
  213. }
  214. func (c *seaweedFilerClient) Ping(ctx context.Context, in *PingRequest, opts ...grpc.CallOption) (*PingResponse, error) {
  215. cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
  216. out := new(PingResponse)
  217. err := c.cc.Invoke(ctx, SeaweedFiler_Ping_FullMethodName, in, out, cOpts...)
  218. if err != nil {
  219. return nil, err
  220. }
  221. return out, nil
  222. }
  223. func (c *seaweedFilerClient) GetFilerConfiguration(ctx context.Context, in *GetFilerConfigurationRequest, opts ...grpc.CallOption) (*GetFilerConfigurationResponse, error) {
  224. cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
  225. out := new(GetFilerConfigurationResponse)
  226. err := c.cc.Invoke(ctx, SeaweedFiler_GetFilerConfiguration_FullMethodName, in, out, cOpts...)
  227. if err != nil {
  228. return nil, err
  229. }
  230. return out, nil
  231. }
  232. func (c *seaweedFilerClient) TraverseBfsMetadata(ctx context.Context, in *TraverseBfsMetadataRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[TraverseBfsMetadataResponse], error) {
  233. cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
  234. stream, err := c.cc.NewStream(ctx, &SeaweedFiler_ServiceDesc.Streams[2], SeaweedFiler_TraverseBfsMetadata_FullMethodName, cOpts...)
  235. if err != nil {
  236. return nil, err
  237. }
  238. x := &grpc.GenericClientStream[TraverseBfsMetadataRequest, TraverseBfsMetadataResponse]{ClientStream: stream}
  239. if err := x.ClientStream.SendMsg(in); err != nil {
  240. return nil, err
  241. }
  242. if err := x.ClientStream.CloseSend(); err != nil {
  243. return nil, err
  244. }
  245. return x, nil
  246. }
  247. // This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
  248. type SeaweedFiler_TraverseBfsMetadataClient = grpc.ServerStreamingClient[TraverseBfsMetadataResponse]
  249. func (c *seaweedFilerClient) SubscribeMetadata(ctx context.Context, in *SubscribeMetadataRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[SubscribeMetadataResponse], error) {
  250. cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
  251. stream, err := c.cc.NewStream(ctx, &SeaweedFiler_ServiceDesc.Streams[3], SeaweedFiler_SubscribeMetadata_FullMethodName, cOpts...)
  252. if err != nil {
  253. return nil, err
  254. }
  255. x := &grpc.GenericClientStream[SubscribeMetadataRequest, SubscribeMetadataResponse]{ClientStream: stream}
  256. if err := x.ClientStream.SendMsg(in); err != nil {
  257. return nil, err
  258. }
  259. if err := x.ClientStream.CloseSend(); err != nil {
  260. return nil, err
  261. }
  262. return x, nil
  263. }
  264. // This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
  265. type SeaweedFiler_SubscribeMetadataClient = grpc.ServerStreamingClient[SubscribeMetadataResponse]
  266. func (c *seaweedFilerClient) SubscribeLocalMetadata(ctx context.Context, in *SubscribeMetadataRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[SubscribeMetadataResponse], error) {
  267. cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
  268. stream, err := c.cc.NewStream(ctx, &SeaweedFiler_ServiceDesc.Streams[4], SeaweedFiler_SubscribeLocalMetadata_FullMethodName, cOpts...)
  269. if err != nil {
  270. return nil, err
  271. }
  272. x := &grpc.GenericClientStream[SubscribeMetadataRequest, SubscribeMetadataResponse]{ClientStream: stream}
  273. if err := x.ClientStream.SendMsg(in); err != nil {
  274. return nil, err
  275. }
  276. if err := x.ClientStream.CloseSend(); err != nil {
  277. return nil, err
  278. }
  279. return x, nil
  280. }
  281. // This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
  282. type SeaweedFiler_SubscribeLocalMetadataClient = grpc.ServerStreamingClient[SubscribeMetadataResponse]
  283. func (c *seaweedFilerClient) KvGet(ctx context.Context, in *KvGetRequest, opts ...grpc.CallOption) (*KvGetResponse, error) {
  284. cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
  285. out := new(KvGetResponse)
  286. err := c.cc.Invoke(ctx, SeaweedFiler_KvGet_FullMethodName, in, out, cOpts...)
  287. if err != nil {
  288. return nil, err
  289. }
  290. return out, nil
  291. }
  292. func (c *seaweedFilerClient) KvPut(ctx context.Context, in *KvPutRequest, opts ...grpc.CallOption) (*KvPutResponse, error) {
  293. cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
  294. out := new(KvPutResponse)
  295. err := c.cc.Invoke(ctx, SeaweedFiler_KvPut_FullMethodName, in, out, cOpts...)
  296. if err != nil {
  297. return nil, err
  298. }
  299. return out, nil
  300. }
  301. func (c *seaweedFilerClient) CacheRemoteObjectToLocalCluster(ctx context.Context, in *CacheRemoteObjectToLocalClusterRequest, opts ...grpc.CallOption) (*CacheRemoteObjectToLocalClusterResponse, error) {
  302. cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
  303. out := new(CacheRemoteObjectToLocalClusterResponse)
  304. err := c.cc.Invoke(ctx, SeaweedFiler_CacheRemoteObjectToLocalCluster_FullMethodName, in, out, cOpts...)
  305. if err != nil {
  306. return nil, err
  307. }
  308. return out, nil
  309. }
  310. func (c *seaweedFilerClient) DistributedLock(ctx context.Context, in *LockRequest, opts ...grpc.CallOption) (*LockResponse, error) {
  311. cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
  312. out := new(LockResponse)
  313. err := c.cc.Invoke(ctx, SeaweedFiler_DistributedLock_FullMethodName, in, out, cOpts...)
  314. if err != nil {
  315. return nil, err
  316. }
  317. return out, nil
  318. }
  319. func (c *seaweedFilerClient) DistributedUnlock(ctx context.Context, in *UnlockRequest, opts ...grpc.CallOption) (*UnlockResponse, error) {
  320. cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
  321. out := new(UnlockResponse)
  322. err := c.cc.Invoke(ctx, SeaweedFiler_DistributedUnlock_FullMethodName, in, out, cOpts...)
  323. if err != nil {
  324. return nil, err
  325. }
  326. return out, nil
  327. }
  328. func (c *seaweedFilerClient) FindLockOwner(ctx context.Context, in *FindLockOwnerRequest, opts ...grpc.CallOption) (*FindLockOwnerResponse, error) {
  329. cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
  330. out := new(FindLockOwnerResponse)
  331. err := c.cc.Invoke(ctx, SeaweedFiler_FindLockOwner_FullMethodName, in, out, cOpts...)
  332. if err != nil {
  333. return nil, err
  334. }
  335. return out, nil
  336. }
  337. func (c *seaweedFilerClient) TransferLocks(ctx context.Context, in *TransferLocksRequest, opts ...grpc.CallOption) (*TransferLocksResponse, error) {
  338. cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
  339. out := new(TransferLocksResponse)
  340. err := c.cc.Invoke(ctx, SeaweedFiler_TransferLocks_FullMethodName, in, out, cOpts...)
  341. if err != nil {
  342. return nil, err
  343. }
  344. return out, nil
  345. }
  346. // SeaweedFilerServer is the server API for SeaweedFiler service.
  347. // All implementations must embed UnimplementedSeaweedFilerServer
  348. // for forward compatibility.
  349. type SeaweedFilerServer interface {
  350. LookupDirectoryEntry(context.Context, *LookupDirectoryEntryRequest) (*LookupDirectoryEntryResponse, error)
  351. ListEntries(*ListEntriesRequest, grpc.ServerStreamingServer[ListEntriesResponse]) error
  352. CreateEntry(context.Context, *CreateEntryRequest) (*CreateEntryResponse, error)
  353. UpdateEntry(context.Context, *UpdateEntryRequest) (*UpdateEntryResponse, error)
  354. AppendToEntry(context.Context, *AppendToEntryRequest) (*AppendToEntryResponse, error)
  355. DeleteEntry(context.Context, *DeleteEntryRequest) (*DeleteEntryResponse, error)
  356. AtomicRenameEntry(context.Context, *AtomicRenameEntryRequest) (*AtomicRenameEntryResponse, error)
  357. StreamRenameEntry(*StreamRenameEntryRequest, grpc.ServerStreamingServer[StreamRenameEntryResponse]) error
  358. AssignVolume(context.Context, *AssignVolumeRequest) (*AssignVolumeResponse, error)
  359. LookupVolume(context.Context, *LookupVolumeRequest) (*LookupVolumeResponse, error)
  360. CollectionList(context.Context, *CollectionListRequest) (*CollectionListResponse, error)
  361. DeleteCollection(context.Context, *DeleteCollectionRequest) (*DeleteCollectionResponse, error)
  362. Statistics(context.Context, *StatisticsRequest) (*StatisticsResponse, error)
  363. Ping(context.Context, *PingRequest) (*PingResponse, error)
  364. GetFilerConfiguration(context.Context, *GetFilerConfigurationRequest) (*GetFilerConfigurationResponse, error)
  365. TraverseBfsMetadata(*TraverseBfsMetadataRequest, grpc.ServerStreamingServer[TraverseBfsMetadataResponse]) error
  366. SubscribeMetadata(*SubscribeMetadataRequest, grpc.ServerStreamingServer[SubscribeMetadataResponse]) error
  367. SubscribeLocalMetadata(*SubscribeMetadataRequest, grpc.ServerStreamingServer[SubscribeMetadataResponse]) error
  368. KvGet(context.Context, *KvGetRequest) (*KvGetResponse, error)
  369. KvPut(context.Context, *KvPutRequest) (*KvPutResponse, error)
  370. CacheRemoteObjectToLocalCluster(context.Context, *CacheRemoteObjectToLocalClusterRequest) (*CacheRemoteObjectToLocalClusterResponse, error)
  371. DistributedLock(context.Context, *LockRequest) (*LockResponse, error)
  372. DistributedUnlock(context.Context, *UnlockRequest) (*UnlockResponse, error)
  373. FindLockOwner(context.Context, *FindLockOwnerRequest) (*FindLockOwnerResponse, error)
  374. // distributed lock management internal use only
  375. TransferLocks(context.Context, *TransferLocksRequest) (*TransferLocksResponse, error)
  376. mustEmbedUnimplementedSeaweedFilerServer()
  377. }
  378. // UnimplementedSeaweedFilerServer must be embedded to have
  379. // forward compatible implementations.
  380. //
  381. // NOTE: this should be embedded by value instead of pointer to avoid a nil
  382. // pointer dereference when methods are called.
  383. type UnimplementedSeaweedFilerServer struct{}
  384. func (UnimplementedSeaweedFilerServer) LookupDirectoryEntry(context.Context, *LookupDirectoryEntryRequest) (*LookupDirectoryEntryResponse, error) {
  385. return nil, status.Errorf(codes.Unimplemented, "method LookupDirectoryEntry not implemented")
  386. }
  387. func (UnimplementedSeaweedFilerServer) ListEntries(*ListEntriesRequest, grpc.ServerStreamingServer[ListEntriesResponse]) error {
  388. return status.Errorf(codes.Unimplemented, "method ListEntries not implemented")
  389. }
  390. func (UnimplementedSeaweedFilerServer) CreateEntry(context.Context, *CreateEntryRequest) (*CreateEntryResponse, error) {
  391. return nil, status.Errorf(codes.Unimplemented, "method CreateEntry not implemented")
  392. }
  393. func (UnimplementedSeaweedFilerServer) UpdateEntry(context.Context, *UpdateEntryRequest) (*UpdateEntryResponse, error) {
  394. return nil, status.Errorf(codes.Unimplemented, "method UpdateEntry not implemented")
  395. }
  396. func (UnimplementedSeaweedFilerServer) AppendToEntry(context.Context, *AppendToEntryRequest) (*AppendToEntryResponse, error) {
  397. return nil, status.Errorf(codes.Unimplemented, "method AppendToEntry not implemented")
  398. }
  399. func (UnimplementedSeaweedFilerServer) DeleteEntry(context.Context, *DeleteEntryRequest) (*DeleteEntryResponse, error) {
  400. return nil, status.Errorf(codes.Unimplemented, "method DeleteEntry not implemented")
  401. }
  402. func (UnimplementedSeaweedFilerServer) AtomicRenameEntry(context.Context, *AtomicRenameEntryRequest) (*AtomicRenameEntryResponse, error) {
  403. return nil, status.Errorf(codes.Unimplemented, "method AtomicRenameEntry not implemented")
  404. }
  405. func (UnimplementedSeaweedFilerServer) StreamRenameEntry(*StreamRenameEntryRequest, grpc.ServerStreamingServer[StreamRenameEntryResponse]) error {
  406. return status.Errorf(codes.Unimplemented, "method StreamRenameEntry not implemented")
  407. }
  408. func (UnimplementedSeaweedFilerServer) AssignVolume(context.Context, *AssignVolumeRequest) (*AssignVolumeResponse, error) {
  409. return nil, status.Errorf(codes.Unimplemented, "method AssignVolume not implemented")
  410. }
  411. func (UnimplementedSeaweedFilerServer) LookupVolume(context.Context, *LookupVolumeRequest) (*LookupVolumeResponse, error) {
  412. return nil, status.Errorf(codes.Unimplemented, "method LookupVolume not implemented")
  413. }
  414. func (UnimplementedSeaweedFilerServer) CollectionList(context.Context, *CollectionListRequest) (*CollectionListResponse, error) {
  415. return nil, status.Errorf(codes.Unimplemented, "method CollectionList not implemented")
  416. }
  417. func (UnimplementedSeaweedFilerServer) DeleteCollection(context.Context, *DeleteCollectionRequest) (*DeleteCollectionResponse, error) {
  418. return nil, status.Errorf(codes.Unimplemented, "method DeleteCollection not implemented")
  419. }
  420. func (UnimplementedSeaweedFilerServer) Statistics(context.Context, *StatisticsRequest) (*StatisticsResponse, error) {
  421. return nil, status.Errorf(codes.Unimplemented, "method Statistics not implemented")
  422. }
  423. func (UnimplementedSeaweedFilerServer) Ping(context.Context, *PingRequest) (*PingResponse, error) {
  424. return nil, status.Errorf(codes.Unimplemented, "method Ping not implemented")
  425. }
  426. func (UnimplementedSeaweedFilerServer) GetFilerConfiguration(context.Context, *GetFilerConfigurationRequest) (*GetFilerConfigurationResponse, error) {
  427. return nil, status.Errorf(codes.Unimplemented, "method GetFilerConfiguration not implemented")
  428. }
  429. func (UnimplementedSeaweedFilerServer) TraverseBfsMetadata(*TraverseBfsMetadataRequest, grpc.ServerStreamingServer[TraverseBfsMetadataResponse]) error {
  430. return status.Errorf(codes.Unimplemented, "method TraverseBfsMetadata not implemented")
  431. }
  432. func (UnimplementedSeaweedFilerServer) SubscribeMetadata(*SubscribeMetadataRequest, grpc.ServerStreamingServer[SubscribeMetadataResponse]) error {
  433. return status.Errorf(codes.Unimplemented, "method SubscribeMetadata not implemented")
  434. }
  435. func (UnimplementedSeaweedFilerServer) SubscribeLocalMetadata(*SubscribeMetadataRequest, grpc.ServerStreamingServer[SubscribeMetadataResponse]) error {
  436. return status.Errorf(codes.Unimplemented, "method SubscribeLocalMetadata not implemented")
  437. }
  438. func (UnimplementedSeaweedFilerServer) KvGet(context.Context, *KvGetRequest) (*KvGetResponse, error) {
  439. return nil, status.Errorf(codes.Unimplemented, "method KvGet not implemented")
  440. }
  441. func (UnimplementedSeaweedFilerServer) KvPut(context.Context, *KvPutRequest) (*KvPutResponse, error) {
  442. return nil, status.Errorf(codes.Unimplemented, "method KvPut not implemented")
  443. }
  444. func (UnimplementedSeaweedFilerServer) CacheRemoteObjectToLocalCluster(context.Context, *CacheRemoteObjectToLocalClusterRequest) (*CacheRemoteObjectToLocalClusterResponse, error) {
  445. return nil, status.Errorf(codes.Unimplemented, "method CacheRemoteObjectToLocalCluster not implemented")
  446. }
  447. func (UnimplementedSeaweedFilerServer) DistributedLock(context.Context, *LockRequest) (*LockResponse, error) {
  448. return nil, status.Errorf(codes.Unimplemented, "method DistributedLock not implemented")
  449. }
  450. func (UnimplementedSeaweedFilerServer) DistributedUnlock(context.Context, *UnlockRequest) (*UnlockResponse, error) {
  451. return nil, status.Errorf(codes.Unimplemented, "method DistributedUnlock not implemented")
  452. }
  453. func (UnimplementedSeaweedFilerServer) FindLockOwner(context.Context, *FindLockOwnerRequest) (*FindLockOwnerResponse, error) {
  454. return nil, status.Errorf(codes.Unimplemented, "method FindLockOwner not implemented")
  455. }
  456. func (UnimplementedSeaweedFilerServer) TransferLocks(context.Context, *TransferLocksRequest) (*TransferLocksResponse, error) {
  457. return nil, status.Errorf(codes.Unimplemented, "method TransferLocks not implemented")
  458. }
  459. func (UnimplementedSeaweedFilerServer) mustEmbedUnimplementedSeaweedFilerServer() {}
  460. func (UnimplementedSeaweedFilerServer) testEmbeddedByValue() {}
  461. // UnsafeSeaweedFilerServer may be embedded to opt out of forward compatibility for this service.
  462. // Use of this interface is not recommended, as added methods to SeaweedFilerServer will
  463. // result in compilation errors.
  464. type UnsafeSeaweedFilerServer interface {
  465. mustEmbedUnimplementedSeaweedFilerServer()
  466. }
  467. func RegisterSeaweedFilerServer(s grpc.ServiceRegistrar, srv SeaweedFilerServer) {
  468. // If the following call pancis, it indicates UnimplementedSeaweedFilerServer was
  469. // embedded by pointer and is nil. This will cause panics if an
  470. // unimplemented method is ever invoked, so we test this at initialization
  471. // time to prevent it from happening at runtime later due to I/O.
  472. if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
  473. t.testEmbeddedByValue()
  474. }
  475. s.RegisterService(&SeaweedFiler_ServiceDesc, srv)
  476. }
  477. func _SeaweedFiler_LookupDirectoryEntry_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  478. in := new(LookupDirectoryEntryRequest)
  479. if err := dec(in); err != nil {
  480. return nil, err
  481. }
  482. if interceptor == nil {
  483. return srv.(SeaweedFilerServer).LookupDirectoryEntry(ctx, in)
  484. }
  485. info := &grpc.UnaryServerInfo{
  486. Server: srv,
  487. FullMethod: SeaweedFiler_LookupDirectoryEntry_FullMethodName,
  488. }
  489. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  490. return srv.(SeaweedFilerServer).LookupDirectoryEntry(ctx, req.(*LookupDirectoryEntryRequest))
  491. }
  492. return interceptor(ctx, in, info, handler)
  493. }
  494. func _SeaweedFiler_ListEntries_Handler(srv interface{}, stream grpc.ServerStream) error {
  495. m := new(ListEntriesRequest)
  496. if err := stream.RecvMsg(m); err != nil {
  497. return err
  498. }
  499. return srv.(SeaweedFilerServer).ListEntries(m, &grpc.GenericServerStream[ListEntriesRequest, ListEntriesResponse]{ServerStream: stream})
  500. }
  501. // This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
  502. type SeaweedFiler_ListEntriesServer = grpc.ServerStreamingServer[ListEntriesResponse]
  503. func _SeaweedFiler_CreateEntry_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  504. in := new(CreateEntryRequest)
  505. if err := dec(in); err != nil {
  506. return nil, err
  507. }
  508. if interceptor == nil {
  509. return srv.(SeaweedFilerServer).CreateEntry(ctx, in)
  510. }
  511. info := &grpc.UnaryServerInfo{
  512. Server: srv,
  513. FullMethod: SeaweedFiler_CreateEntry_FullMethodName,
  514. }
  515. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  516. return srv.(SeaweedFilerServer).CreateEntry(ctx, req.(*CreateEntryRequest))
  517. }
  518. return interceptor(ctx, in, info, handler)
  519. }
  520. func _SeaweedFiler_UpdateEntry_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  521. in := new(UpdateEntryRequest)
  522. if err := dec(in); err != nil {
  523. return nil, err
  524. }
  525. if interceptor == nil {
  526. return srv.(SeaweedFilerServer).UpdateEntry(ctx, in)
  527. }
  528. info := &grpc.UnaryServerInfo{
  529. Server: srv,
  530. FullMethod: SeaweedFiler_UpdateEntry_FullMethodName,
  531. }
  532. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  533. return srv.(SeaweedFilerServer).UpdateEntry(ctx, req.(*UpdateEntryRequest))
  534. }
  535. return interceptor(ctx, in, info, handler)
  536. }
  537. func _SeaweedFiler_AppendToEntry_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  538. in := new(AppendToEntryRequest)
  539. if err := dec(in); err != nil {
  540. return nil, err
  541. }
  542. if interceptor == nil {
  543. return srv.(SeaweedFilerServer).AppendToEntry(ctx, in)
  544. }
  545. info := &grpc.UnaryServerInfo{
  546. Server: srv,
  547. FullMethod: SeaweedFiler_AppendToEntry_FullMethodName,
  548. }
  549. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  550. return srv.(SeaweedFilerServer).AppendToEntry(ctx, req.(*AppendToEntryRequest))
  551. }
  552. return interceptor(ctx, in, info, handler)
  553. }
  554. func _SeaweedFiler_DeleteEntry_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  555. in := new(DeleteEntryRequest)
  556. if err := dec(in); err != nil {
  557. return nil, err
  558. }
  559. if interceptor == nil {
  560. return srv.(SeaweedFilerServer).DeleteEntry(ctx, in)
  561. }
  562. info := &grpc.UnaryServerInfo{
  563. Server: srv,
  564. FullMethod: SeaweedFiler_DeleteEntry_FullMethodName,
  565. }
  566. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  567. return srv.(SeaweedFilerServer).DeleteEntry(ctx, req.(*DeleteEntryRequest))
  568. }
  569. return interceptor(ctx, in, info, handler)
  570. }
  571. func _SeaweedFiler_AtomicRenameEntry_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  572. in := new(AtomicRenameEntryRequest)
  573. if err := dec(in); err != nil {
  574. return nil, err
  575. }
  576. if interceptor == nil {
  577. return srv.(SeaweedFilerServer).AtomicRenameEntry(ctx, in)
  578. }
  579. info := &grpc.UnaryServerInfo{
  580. Server: srv,
  581. FullMethod: SeaweedFiler_AtomicRenameEntry_FullMethodName,
  582. }
  583. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  584. return srv.(SeaweedFilerServer).AtomicRenameEntry(ctx, req.(*AtomicRenameEntryRequest))
  585. }
  586. return interceptor(ctx, in, info, handler)
  587. }
  588. func _SeaweedFiler_StreamRenameEntry_Handler(srv interface{}, stream grpc.ServerStream) error {
  589. m := new(StreamRenameEntryRequest)
  590. if err := stream.RecvMsg(m); err != nil {
  591. return err
  592. }
  593. return srv.(SeaweedFilerServer).StreamRenameEntry(m, &grpc.GenericServerStream[StreamRenameEntryRequest, StreamRenameEntryResponse]{ServerStream: stream})
  594. }
  595. // This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
  596. type SeaweedFiler_StreamRenameEntryServer = grpc.ServerStreamingServer[StreamRenameEntryResponse]
  597. func _SeaweedFiler_AssignVolume_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  598. in := new(AssignVolumeRequest)
  599. if err := dec(in); err != nil {
  600. return nil, err
  601. }
  602. if interceptor == nil {
  603. return srv.(SeaweedFilerServer).AssignVolume(ctx, in)
  604. }
  605. info := &grpc.UnaryServerInfo{
  606. Server: srv,
  607. FullMethod: SeaweedFiler_AssignVolume_FullMethodName,
  608. }
  609. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  610. return srv.(SeaweedFilerServer).AssignVolume(ctx, req.(*AssignVolumeRequest))
  611. }
  612. return interceptor(ctx, in, info, handler)
  613. }
  614. func _SeaweedFiler_LookupVolume_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  615. in := new(LookupVolumeRequest)
  616. if err := dec(in); err != nil {
  617. return nil, err
  618. }
  619. if interceptor == nil {
  620. return srv.(SeaweedFilerServer).LookupVolume(ctx, in)
  621. }
  622. info := &grpc.UnaryServerInfo{
  623. Server: srv,
  624. FullMethod: SeaweedFiler_LookupVolume_FullMethodName,
  625. }
  626. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  627. return srv.(SeaweedFilerServer).LookupVolume(ctx, req.(*LookupVolumeRequest))
  628. }
  629. return interceptor(ctx, in, info, handler)
  630. }
  631. func _SeaweedFiler_CollectionList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  632. in := new(CollectionListRequest)
  633. if err := dec(in); err != nil {
  634. return nil, err
  635. }
  636. if interceptor == nil {
  637. return srv.(SeaweedFilerServer).CollectionList(ctx, in)
  638. }
  639. info := &grpc.UnaryServerInfo{
  640. Server: srv,
  641. FullMethod: SeaweedFiler_CollectionList_FullMethodName,
  642. }
  643. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  644. return srv.(SeaweedFilerServer).CollectionList(ctx, req.(*CollectionListRequest))
  645. }
  646. return interceptor(ctx, in, info, handler)
  647. }
  648. func _SeaweedFiler_DeleteCollection_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  649. in := new(DeleteCollectionRequest)
  650. if err := dec(in); err != nil {
  651. return nil, err
  652. }
  653. if interceptor == nil {
  654. return srv.(SeaweedFilerServer).DeleteCollection(ctx, in)
  655. }
  656. info := &grpc.UnaryServerInfo{
  657. Server: srv,
  658. FullMethod: SeaweedFiler_DeleteCollection_FullMethodName,
  659. }
  660. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  661. return srv.(SeaweedFilerServer).DeleteCollection(ctx, req.(*DeleteCollectionRequest))
  662. }
  663. return interceptor(ctx, in, info, handler)
  664. }
  665. func _SeaweedFiler_Statistics_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  666. in := new(StatisticsRequest)
  667. if err := dec(in); err != nil {
  668. return nil, err
  669. }
  670. if interceptor == nil {
  671. return srv.(SeaweedFilerServer).Statistics(ctx, in)
  672. }
  673. info := &grpc.UnaryServerInfo{
  674. Server: srv,
  675. FullMethod: SeaweedFiler_Statistics_FullMethodName,
  676. }
  677. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  678. return srv.(SeaweedFilerServer).Statistics(ctx, req.(*StatisticsRequest))
  679. }
  680. return interceptor(ctx, in, info, handler)
  681. }
  682. func _SeaweedFiler_Ping_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  683. in := new(PingRequest)
  684. if err := dec(in); err != nil {
  685. return nil, err
  686. }
  687. if interceptor == nil {
  688. return srv.(SeaweedFilerServer).Ping(ctx, in)
  689. }
  690. info := &grpc.UnaryServerInfo{
  691. Server: srv,
  692. FullMethod: SeaweedFiler_Ping_FullMethodName,
  693. }
  694. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  695. return srv.(SeaweedFilerServer).Ping(ctx, req.(*PingRequest))
  696. }
  697. return interceptor(ctx, in, info, handler)
  698. }
  699. func _SeaweedFiler_GetFilerConfiguration_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  700. in := new(GetFilerConfigurationRequest)
  701. if err := dec(in); err != nil {
  702. return nil, err
  703. }
  704. if interceptor == nil {
  705. return srv.(SeaweedFilerServer).GetFilerConfiguration(ctx, in)
  706. }
  707. info := &grpc.UnaryServerInfo{
  708. Server: srv,
  709. FullMethod: SeaweedFiler_GetFilerConfiguration_FullMethodName,
  710. }
  711. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  712. return srv.(SeaweedFilerServer).GetFilerConfiguration(ctx, req.(*GetFilerConfigurationRequest))
  713. }
  714. return interceptor(ctx, in, info, handler)
  715. }
  716. func _SeaweedFiler_TraverseBfsMetadata_Handler(srv interface{}, stream grpc.ServerStream) error {
  717. m := new(TraverseBfsMetadataRequest)
  718. if err := stream.RecvMsg(m); err != nil {
  719. return err
  720. }
  721. return srv.(SeaweedFilerServer).TraverseBfsMetadata(m, &grpc.GenericServerStream[TraverseBfsMetadataRequest, TraverseBfsMetadataResponse]{ServerStream: stream})
  722. }
  723. // This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
  724. type SeaweedFiler_TraverseBfsMetadataServer = grpc.ServerStreamingServer[TraverseBfsMetadataResponse]
  725. func _SeaweedFiler_SubscribeMetadata_Handler(srv interface{}, stream grpc.ServerStream) error {
  726. m := new(SubscribeMetadataRequest)
  727. if err := stream.RecvMsg(m); err != nil {
  728. return err
  729. }
  730. return srv.(SeaweedFilerServer).SubscribeMetadata(m, &grpc.GenericServerStream[SubscribeMetadataRequest, SubscribeMetadataResponse]{ServerStream: stream})
  731. }
  732. // This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
  733. type SeaweedFiler_SubscribeMetadataServer = grpc.ServerStreamingServer[SubscribeMetadataResponse]
  734. func _SeaweedFiler_SubscribeLocalMetadata_Handler(srv interface{}, stream grpc.ServerStream) error {
  735. m := new(SubscribeMetadataRequest)
  736. if err := stream.RecvMsg(m); err != nil {
  737. return err
  738. }
  739. return srv.(SeaweedFilerServer).SubscribeLocalMetadata(m, &grpc.GenericServerStream[SubscribeMetadataRequest, SubscribeMetadataResponse]{ServerStream: stream})
  740. }
  741. // This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
  742. type SeaweedFiler_SubscribeLocalMetadataServer = grpc.ServerStreamingServer[SubscribeMetadataResponse]
  743. func _SeaweedFiler_KvGet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  744. in := new(KvGetRequest)
  745. if err := dec(in); err != nil {
  746. return nil, err
  747. }
  748. if interceptor == nil {
  749. return srv.(SeaweedFilerServer).KvGet(ctx, in)
  750. }
  751. info := &grpc.UnaryServerInfo{
  752. Server: srv,
  753. FullMethod: SeaweedFiler_KvGet_FullMethodName,
  754. }
  755. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  756. return srv.(SeaweedFilerServer).KvGet(ctx, req.(*KvGetRequest))
  757. }
  758. return interceptor(ctx, in, info, handler)
  759. }
  760. func _SeaweedFiler_KvPut_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  761. in := new(KvPutRequest)
  762. if err := dec(in); err != nil {
  763. return nil, err
  764. }
  765. if interceptor == nil {
  766. return srv.(SeaweedFilerServer).KvPut(ctx, in)
  767. }
  768. info := &grpc.UnaryServerInfo{
  769. Server: srv,
  770. FullMethod: SeaweedFiler_KvPut_FullMethodName,
  771. }
  772. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  773. return srv.(SeaweedFilerServer).KvPut(ctx, req.(*KvPutRequest))
  774. }
  775. return interceptor(ctx, in, info, handler)
  776. }
  777. func _SeaweedFiler_CacheRemoteObjectToLocalCluster_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  778. in := new(CacheRemoteObjectToLocalClusterRequest)
  779. if err := dec(in); err != nil {
  780. return nil, err
  781. }
  782. if interceptor == nil {
  783. return srv.(SeaweedFilerServer).CacheRemoteObjectToLocalCluster(ctx, in)
  784. }
  785. info := &grpc.UnaryServerInfo{
  786. Server: srv,
  787. FullMethod: SeaweedFiler_CacheRemoteObjectToLocalCluster_FullMethodName,
  788. }
  789. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  790. return srv.(SeaweedFilerServer).CacheRemoteObjectToLocalCluster(ctx, req.(*CacheRemoteObjectToLocalClusterRequest))
  791. }
  792. return interceptor(ctx, in, info, handler)
  793. }
  794. func _SeaweedFiler_DistributedLock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  795. in := new(LockRequest)
  796. if err := dec(in); err != nil {
  797. return nil, err
  798. }
  799. if interceptor == nil {
  800. return srv.(SeaweedFilerServer).DistributedLock(ctx, in)
  801. }
  802. info := &grpc.UnaryServerInfo{
  803. Server: srv,
  804. FullMethod: SeaweedFiler_DistributedLock_FullMethodName,
  805. }
  806. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  807. return srv.(SeaweedFilerServer).DistributedLock(ctx, req.(*LockRequest))
  808. }
  809. return interceptor(ctx, in, info, handler)
  810. }
  811. func _SeaweedFiler_DistributedUnlock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  812. in := new(UnlockRequest)
  813. if err := dec(in); err != nil {
  814. return nil, err
  815. }
  816. if interceptor == nil {
  817. return srv.(SeaweedFilerServer).DistributedUnlock(ctx, in)
  818. }
  819. info := &grpc.UnaryServerInfo{
  820. Server: srv,
  821. FullMethod: SeaweedFiler_DistributedUnlock_FullMethodName,
  822. }
  823. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  824. return srv.(SeaweedFilerServer).DistributedUnlock(ctx, req.(*UnlockRequest))
  825. }
  826. return interceptor(ctx, in, info, handler)
  827. }
  828. func _SeaweedFiler_FindLockOwner_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  829. in := new(FindLockOwnerRequest)
  830. if err := dec(in); err != nil {
  831. return nil, err
  832. }
  833. if interceptor == nil {
  834. return srv.(SeaweedFilerServer).FindLockOwner(ctx, in)
  835. }
  836. info := &grpc.UnaryServerInfo{
  837. Server: srv,
  838. FullMethod: SeaweedFiler_FindLockOwner_FullMethodName,
  839. }
  840. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  841. return srv.(SeaweedFilerServer).FindLockOwner(ctx, req.(*FindLockOwnerRequest))
  842. }
  843. return interceptor(ctx, in, info, handler)
  844. }
  845. func _SeaweedFiler_TransferLocks_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  846. in := new(TransferLocksRequest)
  847. if err := dec(in); err != nil {
  848. return nil, err
  849. }
  850. if interceptor == nil {
  851. return srv.(SeaweedFilerServer).TransferLocks(ctx, in)
  852. }
  853. info := &grpc.UnaryServerInfo{
  854. Server: srv,
  855. FullMethod: SeaweedFiler_TransferLocks_FullMethodName,
  856. }
  857. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  858. return srv.(SeaweedFilerServer).TransferLocks(ctx, req.(*TransferLocksRequest))
  859. }
  860. return interceptor(ctx, in, info, handler)
  861. }
  862. // SeaweedFiler_ServiceDesc is the grpc.ServiceDesc for SeaweedFiler service.
  863. // It's only intended for direct use with grpc.RegisterService,
  864. // and not to be introspected or modified (even as a copy)
  865. var SeaweedFiler_ServiceDesc = grpc.ServiceDesc{
  866. ServiceName: "filer_pb.SeaweedFiler",
  867. HandlerType: (*SeaweedFilerServer)(nil),
  868. Methods: []grpc.MethodDesc{
  869. {
  870. MethodName: "LookupDirectoryEntry",
  871. Handler: _SeaweedFiler_LookupDirectoryEntry_Handler,
  872. },
  873. {
  874. MethodName: "CreateEntry",
  875. Handler: _SeaweedFiler_CreateEntry_Handler,
  876. },
  877. {
  878. MethodName: "UpdateEntry",
  879. Handler: _SeaweedFiler_UpdateEntry_Handler,
  880. },
  881. {
  882. MethodName: "AppendToEntry",
  883. Handler: _SeaweedFiler_AppendToEntry_Handler,
  884. },
  885. {
  886. MethodName: "DeleteEntry",
  887. Handler: _SeaweedFiler_DeleteEntry_Handler,
  888. },
  889. {
  890. MethodName: "AtomicRenameEntry",
  891. Handler: _SeaweedFiler_AtomicRenameEntry_Handler,
  892. },
  893. {
  894. MethodName: "AssignVolume",
  895. Handler: _SeaweedFiler_AssignVolume_Handler,
  896. },
  897. {
  898. MethodName: "LookupVolume",
  899. Handler: _SeaweedFiler_LookupVolume_Handler,
  900. },
  901. {
  902. MethodName: "CollectionList",
  903. Handler: _SeaweedFiler_CollectionList_Handler,
  904. },
  905. {
  906. MethodName: "DeleteCollection",
  907. Handler: _SeaweedFiler_DeleteCollection_Handler,
  908. },
  909. {
  910. MethodName: "Statistics",
  911. Handler: _SeaweedFiler_Statistics_Handler,
  912. },
  913. {
  914. MethodName: "Ping",
  915. Handler: _SeaweedFiler_Ping_Handler,
  916. },
  917. {
  918. MethodName: "GetFilerConfiguration",
  919. Handler: _SeaweedFiler_GetFilerConfiguration_Handler,
  920. },
  921. {
  922. MethodName: "KvGet",
  923. Handler: _SeaweedFiler_KvGet_Handler,
  924. },
  925. {
  926. MethodName: "KvPut",
  927. Handler: _SeaweedFiler_KvPut_Handler,
  928. },
  929. {
  930. MethodName: "CacheRemoteObjectToLocalCluster",
  931. Handler: _SeaweedFiler_CacheRemoteObjectToLocalCluster_Handler,
  932. },
  933. {
  934. MethodName: "DistributedLock",
  935. Handler: _SeaweedFiler_DistributedLock_Handler,
  936. },
  937. {
  938. MethodName: "DistributedUnlock",
  939. Handler: _SeaweedFiler_DistributedUnlock_Handler,
  940. },
  941. {
  942. MethodName: "FindLockOwner",
  943. Handler: _SeaweedFiler_FindLockOwner_Handler,
  944. },
  945. {
  946. MethodName: "TransferLocks",
  947. Handler: _SeaweedFiler_TransferLocks_Handler,
  948. },
  949. },
  950. Streams: []grpc.StreamDesc{
  951. {
  952. StreamName: "ListEntries",
  953. Handler: _SeaweedFiler_ListEntries_Handler,
  954. ServerStreams: true,
  955. },
  956. {
  957. StreamName: "StreamRenameEntry",
  958. Handler: _SeaweedFiler_StreamRenameEntry_Handler,
  959. ServerStreams: true,
  960. },
  961. {
  962. StreamName: "TraverseBfsMetadata",
  963. Handler: _SeaweedFiler_TraverseBfsMetadata_Handler,
  964. ServerStreams: true,
  965. },
  966. {
  967. StreamName: "SubscribeMetadata",
  968. Handler: _SeaweedFiler_SubscribeMetadata_Handler,
  969. ServerStreams: true,
  970. },
  971. {
  972. StreamName: "SubscribeLocalMetadata",
  973. Handler: _SeaweedFiler_SubscribeLocalMetadata_Handler,
  974. ServerStreams: true,
  975. },
  976. },
  977. Metadata: "filer.proto",
  978. }