Skip to content

Commit

Permalink
feat: MetaInfo更改为Metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
rehiy committed Oct 31, 2023
1 parent c93b4b7 commit b1d957a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion client/api/join.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (

func Join() error {
token := args.VersionNumber
for _, value := range args.NodeMetaInfo {
for _, value := range args.Metadata {
token += ";" + value
}

Expand Down
6 changes: 3 additions & 3 deletions client/cmd/args/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ var VersionNumber = "2"
var EtcDirectory string
var ExecutablePath string

var NodeMetaInfo map[string]string
var Metadata map[string]string

var MetaServerListen = "127.0.0.1:9000"

Expand All @@ -28,8 +28,8 @@ func init() {
logman.Fatal("Find executable failed", "msg", err)
}

// get NodeMetaInfo
NodeMetaInfo = map[string]string{
// get Metadata
Metadata = map[string]string{
"Name": os.Getenv("NODE_NAME"),
"Owner": os.Getenv("NODE_OWNER"),
"Region": os.Getenv("NODE_REGION"),
Expand Down
2 changes: 1 addition & 1 deletion client/cmd/power/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ func ps(c *gin.Context) {

func meta(c *gin.Context) {
c.AbortWithStatusJSON(200, gin.H{
"Metadata": args.Metadata,
"Version": args.Version,
"VersionNumber": args.VersionNumber,
"NodeMetaInfo": args.NodeMetaInfo,
})
}

Expand Down

0 comments on commit b1d957a

Please sign in to comment.