summaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'main.go')
-rw-r--r--main.go19
1 files changed, 18 insertions, 1 deletions
diff --git a/main.go b/main.go
index 3f685dd..581ef09 100644
--- a/main.go
+++ b/main.go
@@ -34,7 +34,7 @@ func main() {
}
me = new(stuff)
- me.urlbase = "http://zookeeper.grid.wit.com:8080"
+ me.urlbase = "http://zookeeper.chap.wit.com:8080"
if argv.URL != "" {
log.Info("USING ARGV URL:", argv.URL)
me.urlbase = argv.URL
@@ -45,5 +45,22 @@ func main() {
me.machine = zoopb.InitMachine()
+ if argv.Test != nil {
+ testURL(me.urlbase, me.machine)
+ os.Exit(0)
+ }
+
zood() // talks to zookeeper
}
+
+func testURL(urlbase string, pb *zoopb.Machine) error {
+ newpb, wsPB, err := pb.HttpPost(urlbase, "test")
+ if err != nil {
+ log.Info("got error:", err)
+ return err
+ }
+ wsPB.DumpClient()
+ newpb.Dump()
+ log.Info("got error:", err)
+ return err
+}