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

utils

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultCreateScrapeConfigPayload = argus.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 GetInstanceName(ctx context.Context, apiClient ArgusClient, instanceId, projectId string) (string, error)

func GetPartialUpdateGrafanaConfigsPayload added in v0.2.3

func GetPartialUpdateGrafanaConfigsPayload(ctx context.Context, apiClient ArgusClient, instanceId, projectId string, singleSignOn, publicReadAccess *bool) (*argus.UpdateGrafanaConfigsPayload, error)

func LoadPlanId

func LoadPlanId(planName string, resp *argus.PlansResponse) (*string, error)

func MapToUpdateScrapeConfigPayload added in v0.2.3

func MapToUpdateScrapeConfigPayload(resp *argus.GetScrapeConfigResponse) (*argus.UpdateScrapeConfigPayload, error)

func ToPayloadGenericOAuth added in v0.2.3

func ToPayloadGenericOAuth(respOAuth *argus.GrafanaOauth) *argus.UpdateGrafanaConfigsPayloadGenericOauth

func ValidatePlanId

func ValidatePlanId(planId string, resp *argus.PlansResponse) error

Types

type ArgusClient

type ArgusClient interface {
	GetInstanceExecute(ctx context.Context, instanceId, projectId string) (*argus.GetInstanceResponse, error)
	GetGrafanaConfigsExecute(ctx context.Context, instanceId, projectId string) (*argus.GrafanaConfigs, error)
	UpdateGrafanaConfigs(ctx context.Context, instanceId string, projectId string) argus.ApiUpdateGrafanaConfigsRequest
}

Jump to

Keyboard shortcuts

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