1
0
mirror of https://github.com/rancher/norman.git synced 2025-09-17 07:40:10 +00:00

Move packages from rancher/rancher to norman

This commit is contained in:
Darren Shepherd
2018-10-22 10:52:52 -07:00
parent 0826175508
commit a47569f599
29 changed files with 1987 additions and 0 deletions

View File

@@ -0,0 +1,34 @@
// +build !windows
package main
import (
"flag"
"net/http"
"github.com/rancher/norman/pkg/remotedialer"
"github.com/sirupsen/logrus"
)
var (
addr string
id string
debug bool
)
func main() {
flag.StringVar(&addr, "connect", "ws://localhost:8123/connect", "Address to connect to")
flag.StringVar(&id, "id", "foo", "Client ID")
flag.BoolVar(&debug, "debug", true, "Debug logging")
flag.Parse()
if debug {
logrus.SetLevel(logrus.DebugLevel)
}
headers := http.Header{
"X-Tunnel-ID": []string{id},
}
remotedialer.ClientConnect(addr, headers, nil, func(string, string) bool { return true }, nil)
}