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:
34
pkg/remotedialer/client/main.go
Normal file
34
pkg/remotedialer/client/main.go
Normal 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)
|
||||
}
|
Reference in New Issue
Block a user