[#195] Use exp epoch attribute instead of tick

Signed-off-by: Denis Kirillov <denis@nspcc.ru>
This commit is contained in:
Denis Kirillov 2022-03-17 17:03:06 +03:00 committed by Angira Kekteeva
parent cfcc8933e4
commit 9d19acadcd
4 changed files with 15 additions and 35 deletions

View file

@ -18,11 +18,11 @@ import (
)
const (
AttributeComplianceMode = ".s3-compliance-mode"
AttributeRetainUntil = ".s3-retain-until"
AttributeSysTickEpoch = "__NEOFS__TICK_EPOCH"
AttributeSysTickTopic = "__NEOFS__TICK_TOPIC"
LockTopic = "lock"
AttributeComplianceMode = ".s3-compliance-mode"
AttributeRetainUntil = ".s3-retain-until"
AttributeExpirationEpoch = "__NEOFS__EXPIRATION_EPOCH"
AttributeSysTickEpoch = "__NEOFS__TICK_EPOCH"
AttributeSysTickTopic = "__NEOFS__TICK_TOPIC"
)
func (n *layer) PutSystemObject(ctx context.Context, p *PutSystemObjectParams) (*data.ObjectInfo, error) {
@ -296,8 +296,7 @@ func (n *layer) attributesFromLock(ctx context.Context, lock *data.ObjectLock) (
}
attrs := [][2]string{
{AttributeSysTickEpoch, strconv.FormatUint(exp, 10)},
{AttributeSysTickTopic, LockTopic},
{AttributeExpirationEpoch, strconv.FormatUint(exp, 10)},
{AttributeRetainUntil, lock.Until.Format(time.RFC3339)},
}