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
6a484ac4
Commit
6a484ac4
authored
Feb 18, 2019
by
Geoff Simmons
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add some more docs to quiet golint.
parent
efafa348
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
0 deletions
+3
-0
metrics.go
pkg/controller/metrics.go
+3
-0
No files found.
pkg/controller/metrics.go
View file @
6a484ac4
...
@@ -135,12 +135,15 @@ var (
...
@@ -135,12 +135,15 @@ var (
},
[]
string
{
"namespace"
,
"kind"
,
"result"
})
},
[]
string
{
"namespace"
,
"kind"
,
"result"
})
)
)
// InitMetrics sets the prometheus provider for the workqueue metrics,
// and registers the counter vectors.
func
InitMetrics
()
{
func
InitMetrics
()
{
workqueue
.
SetProvider
(
promProvider
{})
workqueue
.
SetProvider
(
promProvider
{})
prometheus
.
Register
(
watchCounters
)
prometheus
.
Register
(
watchCounters
)
prometheus
.
Register
(
syncCounters
)
prometheus
.
Register
(
syncCounters
)
}
}
// ServeMetrics executes the HTTP Handler for the /metrics endpoint.
func
ServeMetrics
(
log
*
logrus
.
Logger
,
port
uint16
)
{
func
ServeMetrics
(
log
*
logrus
.
Logger
,
port
uint16
)
{
addr
:=
fmt
.
Sprintf
(
":%d"
,
port
)
addr
:=
fmt
.
Sprintf
(
":%d"
,
port
)
http
.
Handle
(
"/metrics"
,
promhttp
.
Handler
())
http
.
Handle
(
"/metrics"
,
promhttp
.
Handler
())
...
...
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