This commit is contained in:
Francesco Renzi
2026-02-02 11:12:44 +01:00
parent 9cd2ceb86b
commit 33cbb7a1d9
2 changed files with 11 additions and 6 deletions
+3
View File
@@ -7,6 +7,7 @@ import (
"encoding/json"
"fmt"
"io"
"log/slog"
"maps"
"net/http"
"net/url"
@@ -835,6 +836,8 @@ func (c *Client) getActionsServiceAdminConnection(ctx context.Context, rt *regis
return nil, fmt.Errorf("failed to get actions service admin connection: %w", err)
}
slog.Info("got connection", *adminConnection.ActionsServiceURL, c.userAgent)
return adminConnection, nil
}
+8 -6
View File
@@ -4,6 +4,7 @@ import (
"bytes"
"crypto/tls"
"crypto/x509"
"encoding/json"
"fmt"
"io"
"log/slog"
@@ -132,12 +133,13 @@ func (c *commonClient) setSystemInfo(info SystemInfo) {
}
func (c *commonClient) setUserAgent() {
// b, _ := json.Marshal(userAgent{
// SystemInfo: c.systemInfo,
// BuildVersion: buildInfo.version,
// BuildCommitSHA: buildInfo.commitSHA,
// })
c.userAgent = "dockerscaleset"
b, _ := json.Marshal(userAgent{
SystemInfo: c.systemInfo,
BuildVersion: buildInfo.version,
BuildCommitSHA: buildInfo.commitSHA,
})
c.userAgent = string(b)
slog.Info("user agent", "useragent", c.userAgent)
}
// HTTPOption defines a functional option for configuring the Client.