Skip to content

Commit

Permalink
Add version control file
Browse files Browse the repository at this point in the history
  • Loading branch information
jinhui committed Oct 31, 2024
1 parent bda9278 commit 54e8803
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 4 deletions.
2 changes: 1 addition & 1 deletion conf/ebus.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ data_error_continue = true
[discovery]
name = "event"
id = "bus"
address = "tcp://ebus.service.my:8171"
address = "tcp://127.0.0.1:8171"
endpoints = ["{\"address\":\"http://127.0.0.1:6500\",\"datacenter\":\"dev\"}"]
ttl = "30s"
19 changes: 16 additions & 3 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,24 @@
package main

import (
`github.com/jhuix-go/ebus/ebus`
`github.com/jhuix-go/ebus/pkg/app`
`github.com/jhuix-go/ebus/server`
"github.com/jhuix-go/ebus/ebus"
"github.com/jhuix-go/ebus/pkg/app"
"github.com/jhuix-go/ebus/server"
)

func init() {
app.Version = Version
if len(GoVersion) > 0 {
app.GoVersion = GoVersion
}
if len(BuildTime) > 0 {
app.BuildTime = BuildTime
}
if len(CommitHash) > 0 {
app.CommitHash = CommitHash
}
}

func main() {
app.Start(server.SelfName, app.ConfigTypeToml, ebus.NewService())
}
14 changes: 14 additions & 0 deletions version.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/*
* Copyright (c) 2024 jhuix. All rights reserved.
* Use of this source code is governed by a license
* that can be found in the LICENSE file.
*/

package main

var (
Version = "v0.2.0" // ebus service version
GoVersion = ""
BuildTime = ""
CommitHash = ""
)

0 comments on commit 54e8803

Please sign in to comment.