summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-12-14 13:11:58 -0600
committerJeff Carr <[email protected]>2024-12-14 13:11:58 -0600
commit66dc8d1f615af0ceb7ac285b707f17987a5fef46 (patch)
tree04fdac021e174fd15a0077b384cc62f543671f44
parent22d49578c99e7c77ca7f6bd4691e3d88a7cfc7f5 (diff)
-rw-r--r--Makefile5
-rw-r--r--argv.go5
-rw-r--r--main.go3
3 files changed, 10 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 77ad3a6..a3b993c 100644
--- a/Makefile
+++ b/Makefile
@@ -11,7 +11,7 @@ all: build
./zood --version
./zood
-build:
+build: goimports
GO111MODULE=off go build \
-ldflags "-X main.VERSION=${VERSION} -X main.BUILDTIME=${BUILDTIME} -X gui.GUIVERSION=${VERSION}"
@@ -45,3 +45,6 @@ git-clone:
http-list-packages:
curl --silent http://localhost:2521/list?hostname=zookeeper.wit.com
+
+localhost:
+ ./zood --port 2232 --url "http://localhost:2233"
diff --git a/argv.go b/argv.go
index 6a25aa0..f155b3e 100644
--- a/argv.go
+++ b/argv.go
@@ -13,8 +13,9 @@ import (
var argv args
type args struct {
- Daemon bool `arg:"--daemon" default:"false" help:"run in daemon mode"`
- Port int `arg:"--port" default:"2521" help:"port to run on"`
+ Daemon bool `arg:"--daemon" default:"false" help:"run in daemon mode"`
+ Port int `arg:"--port" default:"2521" help:"port to run on"`
+ URL string `arg:"--url" default:"2521" help:"url to use"`
}
func (args) Version() string {
diff --git a/main.go b/main.go
index 0329ad5..d349903 100644
--- a/main.go
+++ b/main.go
@@ -33,6 +33,9 @@ func main() {
me = new(stuff)
me.urlbase = "http://zookeeper.grid.wit.com:8080"
+ if argv.URL != "" {
+ me.urlbase = argv.URL
+ }
me.pollDelay = 3 * time.Second
me.failcountmax = 20 // die every minute if zookeeper can't be found