WIP: Cache head results in the request context #974

Closed
fyrchik wants to merge 6 commits from fyrchik/frostfs-node:head-cache into master

6 commits

Author SHA1 Message Date
8fd27be7d8 WIP: cache HEAD result in context
Some checks failed
DCO action / DCO (pull_request) Failing after 2m13s
Build / Build Components (1.21) (pull_request) Successful in 3m37s
Build / Build Components (1.20) (pull_request) Successful in 3m52s
Vulncheck / Vulncheck (pull_request) Successful in 3m35s
Tests and linters / gopls check (pull_request) Successful in 8m12s
Tests and linters / Tests (1.20) (pull_request) Successful in 8m54s
Tests and linters / Staticcheck (pull_request) Successful in 9m3s
Tests and linters / Lint (pull_request) Successful in 9m32s
Tests and linters / Tests (1.21) (pull_request) Successful in 9m23s
Tests and linters / Tests with -race (pull_request) Successful in 10m48s
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-03-26 16:00:47 +03:00
e66007b1f2 aclsvc: Provide context to CheckEACL
Remove context.TODO() and allow passing RequestContext struct later.

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-03-26 15:51:08 +03:00
de139b30c0 aclsvc/v2: Add toRequestContext() helper
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-03-26 15:48:25 +03:00
81880f92fb aclsvc/v2: Allocate RequestContext once
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-03-26 15:46:55 +03:00
0858886d2a objectsvc: Make requestContextKey private
1. Disallow storing wrongly typed value by this key.
2. This is the way described in context.Value() documentation.

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-03-26 15:44:59 +03:00
ce4e5e56b9 aclsvc: Do not use functional options in NewMessageHeaderSource()
There is only 1 option, which is provided on every callsite.

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-03-26 15:40:12 +03:00