working commit
This commit is contained in:
@@ -9,6 +9,7 @@ import (
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strconv"
|
||||
"time"
|
||||
)
|
||||
|
||||
type Client struct {
|
||||
@@ -27,10 +28,12 @@ func NewClientWithAuth(username, password string) *Client {
|
||||
}
|
||||
}
|
||||
|
||||
func (cli *Client) ServiceHello(ctx context.Context, ref string) (bool, error) {
|
||||
func (cli *Client) ServiceHello(ctx context.Context, ref string, timeout time.Duration) (bool, error) {
|
||||
var res bool
|
||||
var err error
|
||||
|
||||
ctx, _ = context.WithTimeout(ctx, timeout)
|
||||
|
||||
ref, err = convertServiceRefer(ref)
|
||||
if err != nil {
|
||||
return res, err
|
||||
|
||||
Reference in New Issue
Block a user