Skip to content
This repository was archived by the owner on Dec 20, 2024. It is now read-only.

Commit 21d2390

Browse files
authored
Merge pull request #674 from yeya24/feature/add-version
feature: add more version information to both cmd and router
2 parents a3862fb + 9ee5566 commit 21d2390

30 files changed

+357
-57
lines changed

apis/swagger.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,20 @@ paths:
4444
500:
4545
$ref: "#/responses/500ErrorResponse"
4646

47+
/version:
48+
get:
49+
summary: "Get version and build information"
50+
description: |
51+
Get version and build information, including GoVersion, OS,
52+
Arch, Version, BuildDate, and GitCommit.
53+
responses:
54+
200:
55+
description: "no error"
56+
schema:
57+
$ref: "#/definitions/DragonflyVersion"
58+
500:
59+
$ref: "#/responses/500ErrorResponse"
60+
4761
/peer/registry:
4862
post:
4963
summary: "registry a task"
@@ -567,6 +581,30 @@ definitions:
567581
message:
568582
type: string
569583

584+
DragonflyVersion:
585+
type: "object"
586+
description: |
587+
Version and build information of Dragonfly components.
588+
properties:
589+
Version:
590+
type: "string"
591+
description: "Version of Dragonfly components"
592+
Revision:
593+
type: "string"
594+
description: "Git commit when building Dragonfly components"
595+
BuildDate:
596+
type: "string"
597+
description: "Build Date of Dragonfly components"
598+
GoVersion:
599+
type: "string"
600+
description: "Golang runtime version"
601+
OS:
602+
type: "string"
603+
description: "Dragonfly components's operating system"
604+
Arch:
605+
type: "string"
606+
description: "Dragonfly components's architecture target"
607+
570608
ResultInfo:
571609
type: "object"
572610
description: |

apis/types/df_get_task.go

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apis/types/dragonfly_version.go

Lines changed: 59 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apis/types/error.go

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apis/types/error_response.go

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apis/types/peer_create_request.go

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apis/types/peer_create_response.go

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apis/types/peer_info.go

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apis/types/piece_info.go

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apis/types/piece_pull_request.go

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)