Documentation ¶
Index ¶
- Variables
- func GetInstanceName(ctx context.Context, apiClient ObservabilityClient, ...) (string, error)
- func GetPartialUpdateGrafanaConfigsPayload(ctx context.Context, apiClient ObservabilityClient, ...) (*observability.UpdateGrafanaConfigsPayload, error)
- func LoadPlanId(planName string, resp *observability.PlansResponse) (*string, error)
- func MapToUpdateScrapeConfigPayload(resp *observability.GetScrapeConfigResponse) (*observability.UpdateScrapeConfigPayload, error)
- func ToPayloadGenericOAuth(respOAuth *observability.GrafanaOauth) *observability.UpdateGrafanaConfigsPayloadGenericOauth
- func ValidatePlanId(planId string, resp *observability.PlansResponse) error
- type ObservabilityClient
Constants ¶
This section is empty.
Variables ¶
View Source
var ( DefaultCreateScrapeConfigPayload = observability.CreateScrapeConfigPayload{ JobName: utils.Ptr("default-name"), MetricsPath: utils.Ptr("/metrics"), Scheme: utils.Ptr("https"), ScrapeInterval: utils.Ptr("5m"), ScrapeTimeout: utils.Ptr("2m"), StaticConfigs: utils.Ptr(defaultStaticConfigs), } )
Functions ¶
func GetInstanceName ¶
func GetPartialUpdateGrafanaConfigsPayload ¶
func GetPartialUpdateGrafanaConfigsPayload(ctx context.Context, apiClient ObservabilityClient, instanceId, projectId string, singleSignOn, publicReadAccess *bool) (*observability.UpdateGrafanaConfigsPayload, error)
func LoadPlanId ¶
func LoadPlanId(planName string, resp *observability.PlansResponse) (*string, error)
func MapToUpdateScrapeConfigPayload ¶
func MapToUpdateScrapeConfigPayload(resp *observability.GetScrapeConfigResponse) (*observability.UpdateScrapeConfigPayload, error)
func ToPayloadGenericOAuth ¶
func ToPayloadGenericOAuth(respOAuth *observability.GrafanaOauth) *observability.UpdateGrafanaConfigsPayloadGenericOauth
func ValidatePlanId ¶
func ValidatePlanId(planId string, resp *observability.PlansResponse) error
Types ¶
type ObservabilityClient ¶
type ObservabilityClient interface { GetInstanceExecute(ctx context.Context, instanceId, projectId string) (*observability.GetInstanceResponse, error) GetGrafanaConfigsExecute(ctx context.Context, instanceId, projectId string) (*observability.GrafanaConfigs, error) UpdateGrafanaConfigs(ctx context.Context, instanceId string, projectId string) observability.ApiUpdateGrafanaConfigsRequest }
Click to show internal directories.
Click to hide internal directories.