working commit

This commit is contained in:
2026-02-03 11:54:34 +02:00
parent 5cd8797e33
commit fe0a3afcdd
10 changed files with 56 additions and 171 deletions
+4 -1
View File
@@ -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