[#406] cli: Pass context to internal client

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
This commit is contained in:
Evgenii Stratonikov 2023-05-24 16:51:57 +03:00 committed by Evgenii Stratonikov
parent 63473d0806
commit 9562123c49
24 changed files with 83 additions and 82 deletions

View file

@ -75,7 +75,7 @@ func getObjectHash(cmd *cobra.Command, _ []string) {
headPrm.SetAddress(objAddr)
// get hash of full payload through HEAD (may be user can do it through dedicated command?)
res, err := internalclient.HeadObject(headPrm)
res, err := internalclient.HeadObject(cmd.Context(), headPrm)
commonCmd.ExitOnErr(cmd, "rpc error: %w", err)
var cs checksum.Checksum
@ -108,7 +108,7 @@ func getObjectHash(cmd *cobra.Command, _ []string) {
hashPrm.TZ()
}
res, err := internalclient.HashPayloadRanges(hashPrm)
res, err := internalclient.HashPayloadRanges(cmd.Context(), hashPrm)
commonCmd.ExitOnErr(cmd, "rpc error: %w", err)
hs := res.HashList()