[#20] Client: Optimize memory usage
Avoid memory allocation, use cache and static Signed-off-by: Pavel Gross <p.gross@yando.com>
This commit is contained in:
parent
35fe791406
commit
0ddde467cd
46 changed files with 596 additions and 372 deletions
|
@ -1,23 +1,17 @@
|
|||
using FrostFS.SDK.ModelsV2;
|
||||
using FrostFS.Session;
|
||||
using Version = FrostFS.Refs.Version;
|
||||
|
||||
namespace FrostFS.SDK.ClientV2.Mappers.GRPC;
|
||||
|
||||
public static class MetaHeaderMapper
|
||||
{
|
||||
public static RequestMetaHeader ToGrpcMessage(this MetaHeader metaHeader)
|
||||
public static RequestMetaHeader ToMessage(this MetaHeader metaHeader)
|
||||
{
|
||||
return new RequestMetaHeader
|
||||
{
|
||||
Version = new Version
|
||||
{
|
||||
Major = (uint)metaHeader.Version.Major,
|
||||
Minor = (uint)metaHeader.Version.Minor,
|
||||
|
||||
},
|
||||
Version = metaHeader.Version.ToMessage(),
|
||||
Epoch = (uint)metaHeader.Epoch,
|
||||
Ttl = (uint)metaHeader.Ttl
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue