Help us shape the future of Go! Take the 2026 Go Developer Survey

utils

package
v0.40.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 3, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultCreateScrapeConfigPayload = observability.CreateScrapeConfigPayload{
		JobName:        utils.Ptr("default-name"),
		MetricsPath:    utils.Ptr("/metrics"),
		Scheme:         observability.CREATESCRAPECONFIGPAYLOADSCHEME_HTTPS.Ptr(),
		ScrapeInterval: utils.Ptr("5m"),
		ScrapeTimeout:  utils.Ptr("2m"),
		StaticConfigs:  utils.Ptr(defaultStaticConfigs),
	}
)

Functions

func GetInstanceName

func GetInstanceName(ctx context.Context, apiClient ObservabilityClient, instanceId, projectId string) (string, error)

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 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
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL