refactor(grafana): replace dashboard info with import compatible layout
This commit is contained in:
parent
4aad919153
commit
577f821b9d
8 changed files with 173 additions and 110 deletions
|
@ -67,8 +67,8 @@ func NewClient(endpoint string, options ...ClientOption) *Client {
|
|||
return client
|
||||
}
|
||||
|
||||
func (c *Client) NewRequest(ctx context.Context, method, path string, body io.Reader) (*http.Request, error) {
|
||||
url := fmt.Sprintf("%s/%s", c.endpoint, path)
|
||||
func (c *Client) newRequest(ctx context.Context, method, path string, body io.Reader) (*http.Request, error) {
|
||||
url := fmt.Sprintf("%s%s", c.endpoint, path)
|
||||
req, err := http.NewRequest(method, url, body)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
@ -102,7 +102,7 @@ type ErrorResponse struct {
|
|||
TraceID uint
|
||||
}
|
||||
|
||||
func (c *Client) Do(req *http.Request, v any) (*Response, error) {
|
||||
func (c *Client) do(req *http.Request, v any) (*Response, error) {
|
||||
httpResp, err := c.httpClient.Do(req)
|
||||
resp := &Response{Response: httpResp}
|
||||
if err != nil {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue