@@ -8,22 +8,22 @@ import (
8
8
"net/url"
9
9
)
10
10
11
- // Client is a simple client for the required Mimir API resources
11
+ // Client is a simple client for the required Mimir API resources.
12
12
type Client struct {
13
13
client http.Client
14
14
address * url.URL
15
15
prometheusPrefix string
16
16
}
17
17
18
- // Config is used to configure the client
18
+ // Config is used to configure the client.
19
19
type Config struct {
20
20
Address string
21
21
PrometheusPrefix string
22
22
BasicAuthUsername string
23
23
BasicAuthPassword string
24
24
}
25
25
26
- // NewClient creates a new client with the given configuration
26
+ // NewClient creates a new client with the given configuration.
27
27
func NewClient (config Config ) (* Client , error ) {
28
28
addr , err := url .Parse (config .Address )
29
29
if err != nil {
@@ -51,20 +51,20 @@ func NewClient(config Config) (*Client, error) {
51
51
}, nil
52
52
}
53
53
54
- // BasicAuthTransport is a transport that adds basic auth to the request
54
+ // BasicAuthTransport is a transport that adds basic auth to the request.
55
55
type BasicAuthTransport struct {
56
56
Username string
57
57
Password string
58
58
Transport http.RoundTripper
59
59
}
60
60
61
- // RoundTrip adds basic auth to the request
61
+ // RoundTrip adds basic auth to the request.
62
62
func (t * BasicAuthTransport ) RoundTrip (req * http.Request ) (* http.Response , error ) {
63
63
req .SetBasicAuth (t .Username , t .Password )
64
64
return t .Transport .RoundTrip (req )
65
65
}
66
66
67
- // Ready checks if mimir is ready to serve traffic
67
+ // Ready checks if mimir is ready to serve traffic.
68
68
func (c * Client ) Ready (ctx context.Context ) error {
69
69
path := c .address .JoinPath ("/ready" )
70
70
0 commit comments