Browse Source

tools/etcd-agent: add main func

Yicheng Qin 10 years ago
parent
commit
9e69aba7aa
1 changed files with 16 additions and 1 deletions
  1. 16 1
      tools/functional-tester/etcd-agent/main.go

+ 16 - 1
tools/functional-tester/etcd-agent/main.go

@@ -14,6 +14,21 @@
 
 
 package main
 package main
 
 
+import (
+	"flag"
+	"log"
+)
+
 func main() {
 func main() {
-	panic("not implemented")
+	etcdPath := flag.String("etcd-path", "/opt/etcd/bin/etcd", "")
+	flag.Parse()
+
+	a, err := newAgent(*etcdPath)
+	if err != nil {
+		log.Fatal(err)
+	}
+	a.serveRPC()
+
+	var done chan struct{}
+	<-done
 }
 }