Documentation
¶
Overview ¶
Package cloud provides clients for Grafana Cloud platform APIs.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GCOMClient ¶
type GCOMClient struct {
// contains filtered or unexported fields
}
GCOMClient is an HTTP client for the Grafana Cloud API (GCOM).
func NewGCOMClient ¶
func NewGCOMClient(baseURL, token string) (*GCOMClient, error)
NewGCOMClient returns a new GCOMClient configured to call the given base URL using the provided Bearer token.
The client uses a 30-second timeout and will not follow HTTP redirects to a different domain than baseURL.
type GCOMHTTPError ¶ added in v0.2.12
GCOMHTTPError is returned by GCOMClient when the GCOM API responds with a non-200 status. Callers can use errors.As to inspect Status and dispatch on 401/403/404 etc. without parsing the error message.
func (*GCOMHTTPError) Error ¶ added in v0.2.12
func (e *GCOMHTTPError) Error() string
type StackInfo ¶
type StackInfo struct {
ID int `json:"id"`
Slug string `json:"slug"`
Name string `json:"name"`
URL string `json:"url"`
OrgID int `json:"orgId"`
OrgSlug string `json:"orgSlug"`
Status string `json:"status"`
RegionSlug string `json:"regionSlug"`
// Prometheus (Hosted Metrics)
HMInstancePromID int `json:"hmInstancePromId"`
HMInstancePromURL string `json:"hmInstancePromUrl"`
HMInstancePromClusterID int `json:"hmInstancePromClusterId"`
// Loki (Hosted Logs)
HLInstanceID int `json:"hlInstanceId"`
HLInstanceURL string `json:"hlInstanceUrl"`
// Tempo (Hosted Traces)
HTInstanceID int `json:"htInstanceId"`
HTInstanceURL string `json:"htInstanceUrl"`
// Pyroscope (Hosted Profiles)
HPInstanceID int `json:"hpInstanceId"`
HPInstanceURL string `json:"hpInstanceUrl"`
// Fleet Management (Agent Management)
AgentManagementInstanceID int `json:"agentManagementInstanceId"`
AgentManagementInstanceURL string `json:"agentManagementInstanceUrl"`
// Alertmanager
AMInstanceID int `json:"amInstanceId"`
AMInstanceURL string `json:"amInstanceUrl"`
}
StackInfo holds the information about a Grafana Cloud stack as returned by the GCOM API.