Compare commits
1 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
567d2fe03d |
@@ -57,8 +57,11 @@ var upgrader = websocket.Upgrader{
|
|||||||
EnableCompression: false,
|
EnableCompression: false,
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewClient(ip, id string, port uint, logger *logging.Logger) (*Client, error) {
|
func NewClient(id, ip, endpoint string, port uint, logger *logging.Logger) (*Client, error) {
|
||||||
u := url.URL{Scheme: "ws", Host: fmt.Sprintf("%s:%d", ip, port), Path: "status", RawQuery: "id=" + id}
|
if endpoint == "" {
|
||||||
|
endpoint = "status"
|
||||||
|
}
|
||||||
|
u := url.URL{Scheme: "ws", Host: fmt.Sprintf("%s:%d", ip, port), Path: endpoint, RawQuery: "id=" + id}
|
||||||
|
|
||||||
c := &Client{
|
c := &Client{
|
||||||
id: id,
|
id: id,
|
||||||
|
@@ -43,7 +43,7 @@ func NewStatusClient(serviceName, ip string, port uint, debug bool) (*StatusClie
|
|||||||
}
|
}
|
||||||
|
|
||||||
// connect underlying websocket client
|
// connect underlying websocket client
|
||||||
sc.client, err = models.NewClient(ip, serviceName, port, logger)
|
sc.client, err = models.NewClient(serviceName, ip, "", port, logger)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user