mirror of
https://github.com/weaveworks/scope.git
synced 2026-02-14 18:09:59 +00:00
Allow user to specify URLs on the command line, and use that to allow per-target tokens. (#1901)
Also: - Parse targets on startup and catch badly formed ones before Scope can start. - If no port is specified, use default port for scheme; if no scheme is specificed, use 4040. - Use username as probe token
This commit is contained in:
@@ -6,6 +6,7 @@ import (
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"log"
|
||||
"net/url"
|
||||
"time"
|
||||
|
||||
"github.com/ugorji/go/codec"
|
||||
@@ -45,11 +46,16 @@ func main() {
|
||||
}
|
||||
}
|
||||
|
||||
url, err := url.Parse(fmt.Sprintf("http://%s", *publish))
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
||||
client, err := appclient.NewAppClient(appclient.ProbeConfig{
|
||||
Token: *publishToken,
|
||||
ProbeID: *publishID,
|
||||
Insecure: false,
|
||||
}, *publish, *publish, nil)
|
||||
}, *publish, *url, nil)
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user