Skip to content
This repository has been archived by the owner on Feb 27, 2023. It is now read-only.

Commit

Permalink
add /metrics to swagger api
Browse files Browse the repository at this point in the history
Signed-off-by: yeya24 <yb532204897@gmail.com>
  • Loading branch information
yeya24 committed Jul 23, 2019
1 parent 5b0a435 commit f142f4e
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 4 deletions.
11 changes: 11 additions & 0 deletions apis/swagger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,17 @@ paths:
500:
$ref: "#/responses/500ErrorResponse"

/metrics:
get:
summary: "Get Prometheus metrics"
description: "Get Prometheus metrics"
responses:
200:
description: "no error"
schema:
type: "string"
example: "go_goroutines 1"

/peer/registry:
post:
summary: "registry a task"
Expand Down
2 changes: 1 addition & 1 deletion cmd/dfdaemon/app/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ func init() {

// versionExample shows examples in version command, and is used in auto-generated cli docs.
func versionExample() string {
return `dfdaemon, version 0.4.1
return `dfdaemon version 0.4.1
Git commit: 6fd5c8f
Build date: 20190717-15:57:52
Go version: go1.12.6
Expand Down
2 changes: 1 addition & 1 deletion cmd/dfget/app/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ func init() {

// versionExample shows examples in version command, and is used in auto-generated cli docs.
func versionExample() string {
return `dfget, version 0.4.1
return `dfget version 0.4.1
Git commit: 6fd5c8f
Build date: 20190717-15:57:52
Go version: go1.12.6
Expand Down
2 changes: 1 addition & 1 deletion cmd/supernode/app/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ func init() {

// versionExample shows examples in version command, and is used in auto-generated cli docs.
func versionExample() string {
return `supernode, version 0.4.1
return `supernode version 0.4.1
Git commit: 6fd5c8f
Build date: 20190717-15:57:52
Go version: go1.12.6
Expand Down
2 changes: 1 addition & 1 deletion version/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ func init() {

// versionInfoTmpl contains the template used by Info.
var versionInfoTmpl = `
{{.program}}, version {{.version}}
{{.program}} version {{.version}}
Git commit: {{.revision}}
Build date: {{.buildDate}}
Go version: {{.goVersion}}
Expand Down

0 comments on commit f142f4e

Please sign in to comment.