From a82ac0edcda1b5bc4f6da86e29b9e6a0ba3efcc0 Mon Sep 17 00:00:00 2001 From: Evgenii Stratonikov Date: Sat, 29 Jan 2022 16:33:11 +0300 Subject: [PATCH] [#1023] services/object: remove TTL from `Get` parameters It was unused an should be provided as a `CallOption` instead. Signed-off-by: Evgenii Stratonikov --- pkg/services/object/internal/client/client.go | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/pkg/services/object/internal/client/client.go b/pkg/services/object/internal/client/client.go index c03e11e1..c713bfee 100644 --- a/pkg/services/object/internal/client/client.go +++ b/pkg/services/object/internal/client/client.go @@ -58,6 +58,11 @@ func (x *commonPrm) SetBearerToken(tok *token.BearerToken) { x.opts = append(x.opts, client.WithBearer(tok)) } +// SetTTL sets time-to-live call option. +func (x *commonPrm) SetTTL(ttl uint32) { + x.opts = append(x.opts, client.WithTTL(ttl)) +} + // SetXHeaders sets request X-Headers. // // By default X-Headers will not be attached to the request. @@ -69,8 +74,6 @@ func (x *commonPrm) SetXHeaders(xhdrs []*session.XHeader) { type readPrmCommon struct { commonPrm - - ttl uint32 } // SetNetmapEpoch sets the epoch number to be used to locate the object. @@ -84,13 +87,6 @@ func (x *readPrmCommon) SetNetmapEpoch(epoch uint64) { x.opts = append(x.opts, client.WithXHeader(xNetmapEpoch)) } -// SetTTL sets request TTL value. -// -// Required parameter. -func (x *readPrmCommon) SetTTL(ttl uint32) { - x.opts = append(x.opts, client.WithTTL(ttl)) -} - // GetObjectPrm groups parameters of GetObject operation. type GetObjectPrm struct { readPrmCommon