Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
perxis-go
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Package Registry
Operate
Terraform modules
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
perxis
perxis-go
Commits
f3feb9ea
Commit
f3feb9ea
authored
1 year ago
by
ensiouel
Browse files
Options
Downloads
Patches
Plain Diff
refactor(WithMetrics): добавлена проверка на nil для оборачиваемого кэша
parent
300c0516
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
pkg/cache/metrics_cache.go
+3
-0
3 additions, 0 deletions
pkg/cache/metrics_cache.go
with
3 additions
and
0 deletions
pkg/cache/metrics_cache.go
+
3
−
0
View file @
f3feb9ea
...
...
@@ -26,6 +26,9 @@ type metricsCache struct {
//
// Метрики записываются в prometheus.DefaultRegisterer
func
WithMetrics
(
cache
Cache
,
cacheID
string
)
Cache
{
if
cache
==
nil
{
panic
(
"cannot wrap metrics in cache, cache is nil"
)
}
return
&
metricsCache
{
cacheID
:
cacheID
,
cache
:
cache
,
...
...
This diff is collapsed.
Click to expand it.
Semyon Krestyaninov
@krestyaninov
mentioned in commit
3fc8da4c
·
1 year ago
mentioned in commit
3fc8da4c
mentioned in commit 3fc8da4c9fb48f96d11366dff91dc19fb0def90a
Toggle commit list
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment