Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
k8s-ingress
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
3
Merge Requests
3
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
uplex-varnish
k8s-ingress
Commits
efafa348
Commit
efafa348
authored
Feb 18, 2019
by
Geoff Simmons
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Elide the function receiver where it's not used (quiets golint).
parent
7127d098
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
metrics.go
pkg/controller/metrics.go
+5
-5
No files found.
pkg/controller/metrics.go
View file @
efafa348
...
@@ -47,7 +47,7 @@ const (
...
@@ -47,7 +47,7 @@ const (
type
promProvider
struct
{}
type
promProvider
struct
{}
func
(
_
promProvider
)
NewDepthMetric
(
name
string
)
workqueue
.
GaugeMetric
{
func
(
promProvider
)
NewDepthMetric
(
name
string
)
workqueue
.
GaugeMetric
{
label
:=
make
(
map
[
string
]
string
)
label
:=
make
(
map
[
string
]
string
)
label
[
"namespace"
]
=
name
label
[
"namespace"
]
=
name
depth
:=
prometheus
.
NewGauge
(
prometheus
.
GaugeOpts
{
depth
:=
prometheus
.
NewGauge
(
prometheus
.
GaugeOpts
{
...
@@ -61,7 +61,7 @@ func (_ promProvider) NewDepthMetric(name string) workqueue.GaugeMetric {
...
@@ -61,7 +61,7 @@ func (_ promProvider) NewDepthMetric(name string) workqueue.GaugeMetric {
return
depth
return
depth
}
}
func
(
_
promProvider
)
NewAddsMetric
(
name
string
)
workqueue
.
CounterMetric
{
func
(
promProvider
)
NewAddsMetric
(
name
string
)
workqueue
.
CounterMetric
{
label
:=
make
(
map
[
string
]
string
)
label
:=
make
(
map
[
string
]
string
)
label
[
"namespace"
]
=
name
label
[
"namespace"
]
=
name
adds
:=
prometheus
.
NewCounter
(
prometheus
.
CounterOpts
{
adds
:=
prometheus
.
NewCounter
(
prometheus
.
CounterOpts
{
...
@@ -75,7 +75,7 @@ func (_ promProvider) NewAddsMetric(name string) workqueue.CounterMetric {
...
@@ -75,7 +75,7 @@ func (_ promProvider) NewAddsMetric(name string) workqueue.CounterMetric {
return
adds
return
adds
}
}
func
(
_
promProvider
)
NewLatencyMetric
(
name
string
)
workqueue
.
SummaryMetric
{
func
(
promProvider
)
NewLatencyMetric
(
name
string
)
workqueue
.
SummaryMetric
{
label
:=
make
(
map
[
string
]
string
)
label
:=
make
(
map
[
string
]
string
)
label
[
"namespace"
]
=
name
label
[
"namespace"
]
=
name
latency
:=
prometheus
.
NewSummary
(
prometheus
.
SummaryOpts
{
latency
:=
prometheus
.
NewSummary
(
prometheus
.
SummaryOpts
{
...
@@ -90,7 +90,7 @@ func (_ promProvider) NewLatencyMetric(name string) workqueue.SummaryMetric {
...
@@ -90,7 +90,7 @@ func (_ promProvider) NewLatencyMetric(name string) workqueue.SummaryMetric {
return
latency
return
latency
}
}
func
(
_
promProvider
)
NewWorkDurationMetric
(
name
string
)
workqueue
.
SummaryMetric
{
func
(
promProvider
)
NewWorkDurationMetric
(
name
string
)
workqueue
.
SummaryMetric
{
label
:=
make
(
map
[
string
]
string
)
label
:=
make
(
map
[
string
]
string
)
label
[
"namespace"
]
=
name
label
[
"namespace"
]
=
name
workDuration
:=
prometheus
.
NewSummary
(
prometheus
.
SummaryOpts
{
workDuration
:=
prometheus
.
NewSummary
(
prometheus
.
SummaryOpts
{
...
@@ -105,7 +105,7 @@ func (_ promProvider) NewWorkDurationMetric(name string) workqueue.SummaryMetric
...
@@ -105,7 +105,7 @@ func (_ promProvider) NewWorkDurationMetric(name string) workqueue.SummaryMetric
return
workDuration
return
workDuration
}
}
func
(
_
promProvider
)
NewRetriesMetric
(
name
string
)
workqueue
.
CounterMetric
{
func
(
promProvider
)
NewRetriesMetric
(
name
string
)
workqueue
.
CounterMetric
{
label
:=
make
(
map
[
string
]
string
)
label
:=
make
(
map
[
string
]
string
)
label
[
"namespace"
]
=
name
label
[
"namespace"
]
=
name
retries
:=
prometheus
.
NewCounter
(
prometheus
.
CounterOpts
{
retries
:=
prometheus
.
NewCounter
(
prometheus
.
CounterOpts
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment