From f8018f9c3d38cdbfc664aee6026bb8abd1acd233 Mon Sep 17 00:00:00 2001 From: Leonard Lyubich Date: Mon, 11 Jan 2021 18:14:07 +0300 Subject: [PATCH] [#241] v2/session: Define keys of the well-known X-headers Signed-off-by: Leonard Lyubich --- v2/session/grpc/service.pb.go | Bin 21534 -> 21533 bytes v2/session/grpc/types.pb.go | Bin 44074 -> 44980 bytes v2/session/xheaders.go | 16 ++++++++++++++++ 3 files changed, 16 insertions(+) create mode 100644 v2/session/xheaders.go diff --git a/v2/session/grpc/service.pb.go b/v2/session/grpc/service.pb.go index e18b8f3fc6fb3b53e69bda1b8bd59f09135d5f6d..223c38bc4c07d7df68371d0a58485c704f0f03f2 100644 GIT binary patch delta 20 ccmbQYf^qH&#tpKfjKP!TL@hRliypTF08BIn<^TWy delta 22 ecmbQcf^pso#tpKfj4qSqL@gNgHiwBGw*vrH7zYIa diff --git a/v2/session/grpc/types.pb.go b/v2/session/grpc/types.pb.go index fe557fd0e23cf1f3c2aeffe81e879d1eee72a0f5..aba3cebc9bbcb05aa19764dffed125c2eccbdfd6 100644 GIT binary patch delta 927 zcmb_ay>1gh5SCI>(WV=vv4pTgfe@lY;0P3ATZuzMr1N@r&bN4P_ShertL`0m3@W7L zJ!t886=wJ1lYk0|;-uBh%=b6*^~cfO&!cZQ#~oaV7Nn&hG=ZQNqDMDYSZYEA6$*vU zKR7*wU}24*DWGc{1}<72Xd0uX2%6spcW5Tun!3-i1rjwv9eqfHk@TmCuoFfrxL%%( zpMwuhceI(ndttaF1&wkm)=g+9aEUzNg9qyp;wAdVl1C4F9V$?U}I&KR>0eVl0Dk>#{}CLA+bgZoSu=<5Uy4E2dD?nxUP^Wut n1Rr45=V2}6Hi>5^Djytl#@cOc{w1>in%KiXBfI@@{Qb)>V5K{N delta 26 icmdmTpJ~+%rVTNY>|7<41*r-Vlh-S?ZZ48_ngjro&kBhE diff --git a/v2/session/xheaders.go b/v2/session/xheaders.go new file mode 100644 index 00000000..64b16dee --- /dev/null +++ b/v2/session/xheaders.go @@ -0,0 +1,16 @@ +package session + +// ReservedXHeaderPrefix is a prefix of keys to "well-known" X-headers. +const ReservedXHeaderPrefix = "__NEOFS__" + +const ( + // XHeaderNetmapEpoch is a key to the reserved X-header that specifies netmap epoch + // to use for object placement calculation. If set to '0' or not set, the current + // epoch only will be used. + XHeaderNetmapEpoch = ReservedXHeaderPrefix + "NETMAP_EPOCH" + + // XHeaderNetmapLookupDepth is a key to the reserved X-header that limits + // how many past epochs back the node will can lookup. If set to '0' or not + // set, the current epoch only will be used. + XHeaderNetmapLookupDepth = ReservedXHeaderPrefix + "NETMAP_LOOKUP_DEPTH" +)