forked from TrueCloudLab/frostfs-node
[#505] morph/container: Change get container API
Make `Get` method of the wrapper over Container contract's client to accept binary container ID. Create `Get` function similar to the previous `Get` variation. Use this function in Container service server in the place where `Get` method was used. Additionally implement `AsContainerSource` function which allows to simply compose container Source interface from the wrapper. Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
6310535b3c
commit
83c27f6e8a
6 changed files with 33 additions and 19 deletions
|
@ -58,7 +58,7 @@ func (s *morphExecutor) Delete(ctx context.Context, body *container.DeleteReques
|
|||
func (s *morphExecutor) Get(ctx context.Context, body *container.GetRequestBody) (*container.GetResponseBody, error) {
|
||||
cid := containerSDK.NewIDFromV2(body.GetContainerID())
|
||||
|
||||
cnr, err := s.wrapper.Get(cid)
|
||||
cnr, err := wrapper.Get(s.wrapper, cid)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue