chronosphere

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2024 License: Apache-2.0 Imports: 72 Imported by: 0

Documentation

Overview

Code generated by go generate; DO NOT EDIT.

Index

Constants

View Source
const LocalName = "local/chronosphereio/chronosphere"

LocalName is the provider name that is used for local installation.

View Source
const LogAllocationConfigID = "log_allocation_config_singleton"

LogAllocationConfigID is the static ID of the global LogAllocationConfig singleton.

View Source
const OtelMetricsIngestionID = "otel_metrics_ingestion_singleton"

OtelMetricsIngestionID is the static ID of the global OtelMetricsIngestion singleton.

View Source
const ResourcePoolsID = "resource_pool_singleton"

ResourcePoolsID is the static ID of the global ResourcePools singleton.

View Source
const TraceTailSamplingRulesID = "trace_tail_sampling_singleton"

TraceTailSamplingRulesID is the static ID of the global TraceTailSamplingRules singleton.

Variables

View Source
var BlackHoleAlertNotifierDryRunCount atomic.Int64

BlackHoleAlertNotifierDryRunCount tracks how many times dry run is run during validation for testing.

View Source
var BucketDryRunCount atomic.Int64

BucketDryRunCount tracks how many times dry run is run during validation for testing.

View Source
var ClassicDashboardDryRunCount atomic.Int64

ClassicDashboardDryRunCount tracks how many times dry run is run during validation for testing.

View Source
var CollectionDryRunCount atomic.Int64

CollectionDryRunCount tracks how many times dry run is run during validation for testing.

View Source
var DashboardDryRunCount atomic.Int64

DashboardDryRunCount tracks how many times dry run is run during validation for testing.

View Source
var DatasetDryRunCount atomic.Int64

DatasetDryRunCount tracks how many times dry run is run during validation for testing.

View Source
var DerivedLabelDryRunCount atomic.Int64

DerivedLabelDryRunCount tracks how many times dry run is run during validation for testing.

View Source
var DerivedMetricDryRunCount atomic.Int64

DerivedMetricRunCount tracks how many times dry run is run during validation for testing.

View Source
var DropRuleDryRunCount atomic.Int64

DropRuleDryRunCount tracks how many times dry run is run during validation for testing.

View Source
var EmailAlertNotifierDryRunCount atomic.Int64

EmailAlertNotifierDryRunCount tracks how many times dry run is run during validation for testing.

View Source
var GcpMetricsIntegrationDryRunCount atomic.Int64

GcpMetricsIntegrationDryRunCount tracks how many times dry run is run during validation for testing.

View Source
var LogAllocationConfigDryRunCount atomic.Int64

LogAllocationConfigDryRunCount tracks how many times dry run is run during validation for testing.

View Source
var LogscaleActionDryRunCount atomic.Int64

LogscaleActionDryRunCount tracks how many times dry run is run during validation for testing.

View Source
var LogscaleAlertDryRunCount atomic.Int64

LogscaleAlertDryRunCount tracks how many times dry run is run during validation for testing.

View Source
var MappingRuleDryRunCount atomic.Int64

MappingRuleDryRunCount tracks how many times dry run is run during validation for testing.

View Source
var MonitorDryRunCount atomic.Int64

MonitorDryRunCount tracks how many times dry run is run during validation for testing.

View Source
var NotificationPolicyDryRunCount atomic.Int64

NotificationPolicyDryRunCount tracks how many times dry run is run during validation for testing.

View Source
var OpsGenieAlertNotifierDryRunCount atomic.Int64

OpsGenieAlertNotifierDryRunCount tracks how many times dry run is run during validation for testing.

View Source
var OtelMetricsIngestionDryRunCount atomic.Int64

OtelMetricsIngestionDryRunCount tracks how many times dry run is run during validation for testing.

View Source
var PagerDutyAlertNotifierDryRunCount atomic.Int64

PagerDutyAlertNotifierDryRunCount tracks how many times dry run is run during validation for testing.

View Source
var RecordingRuleDryRunCount atomic.Int64

RecordingRuleDryRunCount tracks how many times dry run is run during validation for testing.

View Source
var ResourcePoolsConfigDryRunCount atomic.Int64

ResourcePoolsConfigDryRunCount tracks how many times dry run is run during validation for testing.

View Source
var RollupRuleDryRunCount atomic.Int64

RollupRuleDryRunCount tracks how many times dry run is run during validation for testing.

View Source
var SlackAlertNotifierDryRunCount atomic.Int64

SlackAlertNotifierDryRunCount tracks how many times dry run is run during validation for testing.

View Source
var TeamDryRunCount atomic.Int64

TeamDryRunCount tracks how many times dry run is run during validation for testing.

View Source
var TraceJaegerRemoteSamplingStrategyDryRunCount atomic.Int64

TraceJaegerRemoteSamplingStrategyDryRunCount tracks how many times dry run is run during validation for testing.

View Source
var TraceMetricsRuleDryRunCount atomic.Int64

TraceMetricsRuleDryRunCount tracks how many times dry run is run during validation for testing.

View Source
var TraceTailSamplingRulesDryRunCount atomic.Int64

TraceTailSamplingRulesDryRunCount tracks how many times dry run is run during validation for testing.

View Source
var VictorOpsAlertNotifierDryRunCount atomic.Int64

VictorOpsAlertNotifierDryRunCount tracks how many times dry run is run during validation for testing.

View Source
var WebhookAlertNotifierDryRunCount atomic.Int64

WebhookAlertNotifierDryRunCount tracks how many times dry run is run during validation for testing.

Functions

func BlackholeAlertNotifierFromModel

func BlackholeAlertNotifierFromModel(
	n *models.Configv1Notifier,
) (*intschema.BlackholeAlertNotifier, error)

func BoolPtr

func BoolPtr(b bool) *bool

func ClassicDashboardFromModel

func ClassicDashboardFromModel(m *models.Configv1GrafanaDashboard) (*intschema.ClassicDashboard, error)

ClassicDashboardFromModel maps an API model to an intschema model.

func CollectionFromModel

func CollectionFromModel(m *models.Configv1Collection) (*intschema.Collection, error)

CollectionFromModel maps an API model to the intschema model.

func CollectionTypeSlugFromID

func CollectionTypeSlugFromID(id string) (collType configmodels.Configv1CollectionReferenceType, slug string, ok bool)

CollectionTypeSlugFromID converts an encoded ID containing type/slug into its' components. TODO: Should we validate type here, or rely on the swagger client validation? Client validation may not happen on Plan.

func CollectionTypeSlugToID

func CollectionTypeSlugToID(collType configmodels.Configv1CollectionReferenceType, slug string) string

CollectionTypeSlugToID encodes a collection type and slug into a single string for referencing collections of different types.

func DashboardFromModel

func DashboardFromModel(m *models.Configv1Dashboard) (*intschema.Dashboard, error)

DashboardFromModel maps an API model to an intschema model.

func DataBucketFromModel

func DataBucketFromModel(b *models.Configv1Bucket) *intschema.DataBucket

DataBucketFromModel maps an API model to an intschema model.

func DataCollectionFromModel

func DataCollectionFromModel(b *models.Configv1Collection) *intschema.DataCollection

DataCollectionFromModel maps an API model to an intschema model.

func DataServiceFromModel

func DataServiceFromModel(s *configmodels.Configv1Service) *intschema.DataService

DataServiceFromModel maps an API model to an intschema model.

func DatasetFromModel

func DatasetFromModel(m *models.Configv1Dataset) (*intschema.Dataset, error)

DatasetFromModel maps an API model to an intschema model.

func DerivedLabelFromModel

func DerivedLabelFromModel(m *models.Configv1DerivedLabel) (*intschema.DerivedLabel, error)

DerivedLabelFromModel maps an API model to an intschema model.

func DerivedMetricFromModel

func DerivedMetricFromModel(m *models.Configv1DerivedMetric) (*intschema.DerivedMetric, error)

DerivedMetricFromModel maps an API model to an intschema model.

func DropRuleFromModel

func DropRuleFromModel(m *models.Configv1DropRule) (*intschema.DropRule, error)

DropRuleFromModel maps an API model to an intschema model.

func EmailAlertNotifierFromModel

func EmailAlertNotifierFromModel(
	m *models.Configv1Notifier,
) (*intschema.EmailAlertNotifier, error)

func GcpMetricsIntegrationFromModel

func GcpMetricsIntegrationFromModel(m *models.Configv1GcpMetricsIntegration) (*intschema.GcpMetricsIntegration, error)

GcpMetricsIntegrationFromModel maps an API model to the intschema model.

func LogscaleActionFromModel added in v1.3.0

func LogscaleActionFromModel(m *models.Configv1LogScaleAction) (*intschema.LogscaleAction, error)

LogscaleActionFromModel maps an API model to the intschema model.

func LogscaleAlertFromModel added in v1.3.0

func LogscaleAlertFromModel(m *models.Configv1LogScaleAlert) (*intschema.LogscaleAlert, error)

LogscaleAlertFromModel maps an API model to the intschema model.

func MappingRuleFromModel

func MappingRuleFromModel(m *models.Configv1MappingRule) (*intschema.MappingRule, error)

MappingRuleFromModel maps an API model to an intschema model.

func MonitorFromModel

func MonitorFromModel(m *models.Configv1Monitor) (*intschema.Monitor, error)

MonitorFromModel maps an API model to an intschema model.

func NotificationPolicyFromModel

func NotificationPolicyFromModel(m *models.Configv1NotificationPolicy) (*intschema.NotificationPolicy, error)

NotificationPolicyFromModel maps an API model to an intschema model.

func OpsgenieAlertNotifierFromModel

func OpsgenieAlertNotifierFromModel(
	m *models.Configv1Notifier,
) (*intschema.OpsgenieAlertNotifier, error)

func OtelMetricsIngestionFromModel added in v1.4.0

func OtelMetricsIngestionFromModel(m *models.Configv1OtelMetricsIngestion) (*intschema.OtelMetricsIngestion, error)

OtelMetricsIngestionFromModel maps an API model into an intschema model.

func PagerdutyAlertNotifierFromModel

func PagerdutyAlertNotifierFromModel(
	m *models.Configv1Notifier,
) (*intschema.PagerdutyAlertNotifier, error)

func ParseOptionalDuration

func ParseOptionalDuration(v string) (time.Duration, error)

ParseOptionalDuration is similar to ParseDuration, but treats empty string as 0.

func Provider

func Provider() *schema.Provider

Provider returns the chronosphere provider.

func RecordingRuleFromModel

func RecordingRuleFromModel(m *models.Configv1RecordingRule) (*intschema.RecordingRule, error)

RecordingRuleFromModel maps an API model to an intschema model.

func ResourcePoolsConfigFromModel

func ResourcePoolsConfigFromModel(m *apimodels.Configv1ResourcePools) (*intschema.ResourcePoolsConfig, error)

ResourcePoolsConfigFromModel maps an API model into an intschema model.

func RollupRuleFromModel

func RollupRuleFromModel(m *models.Configv1RollupRule) (*intschema.RollupRule, error)

RollupRuleFromModel maps an API model to an intschema model.

func ServiceAccountFromModel

func ServiceAccountFromModel(m *models.Configv1ServiceAccount) (*intschema.ServiceAccount, error)

ServiceAccountFromModel converts a service account to the intschema representation

func SlackAlertNotifierFromModel

func SlackAlertNotifierFromModel(
	m *models.Configv1Notifier,
) (*intschema.SlackAlertNotifier, error)

func TeamFromModel

func TeamFromModel(m *models.Configv1Team) (*intschema.Team, error)

TeamFromModel maps an API model to the intschema model.

func VictoropsAlertNotifierFromModel

func VictoropsAlertNotifierFromModel(
	m *models.Configv1Notifier,
) (*intschema.VictoropsAlertNotifier, error)

func WebhookAlertNotifierFromModel

func WebhookAlertNotifierFromModel(
	m *models.Configv1Notifier,
) (*intschema.WebhookAlertNotifier, error)

Types

type AlertLabelMatcher

type AlertLabelMatcher struct {
	Name  string            `json:"name,omitempty"`
	Type  *LabelMatcherType `json:"type,omitempty"`
	Value string            `json:"value,omitempty"`
}

AlertLabelMatcher represents a matcher for entities

type DashboardMetadata

type DashboardMetadata struct {
	Name string
	Slug string
}

DashboardMetadata holds metadata about a dashboard that's encoded in the JSON payload.

func ClassicDashboardExtract

func ClassicDashboardExtract(dashboardJSON string) (DashboardMetadata, string, error)

ClassicDashboardExtract sanitizes the dashboard JSON and extracts DashboardMetadata.

type LabelMatcherType

type LabelMatcherType string

LabelMatcherType represents matcher types for labels.

const (
	InvalidMatcherType LabelMatcherType = "INVALID_MATCHER_TYPE"
	ExactMatcherType   LabelMatcherType = "EXACT_MATCHER_TYPE"
	RegexpMatcherType  LabelMatcherType = "REGEXP_MATCHER_TYPE"
)

EntitiesMatcherType enum values are as follows:

type LogAllocationConfigConverter added in v1.4.0

type LogAllocationConfigConverter struct{}

type NotificationPolicyData

type NotificationPolicyData struct {
	Routes *Routes `json:"routes,omitempty"`
}

NotificationPolicyData stores policy information for inline policies, which is used by the bucket resource to create and manage the policy. It matches the previously marshalled values generated from legacy API models.

func (*NotificationPolicyData) ToModel

type OptionalMap

type OptionalMap[T comparable, V any] map[T]V

OptionalMap implements OptionalValue for maps.

func (OptionalMap[T, V]) IsEmpty

func (m OptionalMap[T, V]) IsEmpty() bool

func (OptionalMap[T, V]) Value

func (m OptionalMap[T, V]) Value() any

type OptionalString

type OptionalString string

OptionalString implements OptionalValue for strings.

func (OptionalString) IsEmpty

func (s OptionalString) IsEmpty() bool

func (OptionalString) Value

func (s OptionalString) Value() any

type OptionalValue

type OptionalValue interface {
	Value() any
	IsEmpty() bool
}

OptionalValue is used for fields that are marked as optional, where Terraform differentiates between null and a default value, but the server does not.

type ResourceGetter

type ResourceGetter interface {
	Get(key string) any
	Id() string
	GetOk(key string) (any, bool)
}

ResourceGetter is a subset of the read-only interface to read resource data from schema.ResourceData and schema.ResourceDiff.

type Routes

type Routes struct {
	Defaults  map[string]RoutesNotifierList `json:"defaults,omitempty"`
	Overrides []*RoutesOverride             `json:"overrides"`
}

Routes represents the routes of a notification policy

type RoutesNotifierList

type RoutesNotifierList struct {
	Notifiers      []*RoutesNotifierListNotifier `json:"notifiers"`
	RepeatInterval string                        `json:"repeat_interval,omitempty"`
	GroupBy        *RoutesNotifierListGroupBy    `json:"group_by,omitempty"`
}

RoutesNotifierList is a list of notifiers along with configuration for when those notifiers should repeat alerting and whether they should be grouped by any specific values.

type RoutesNotifierListGroupBy added in v1.2.0

type RoutesNotifierListGroupBy struct {
	LabelNames []string `json:"label_names,omitempty"`
}

RoutesNotifierListGroupBy is a list of label names by which notifications are grouped.

type RoutesNotifierListNotifier

type RoutesNotifierListNotifier struct {
	Name string `json:"name,omitempty"`
	Slug string `json:"slug,omitempty"`
}

RoutesNotifierListNotifier is a notifier in a list of notifiers

type RoutesOverride

type RoutesOverride struct {
	AlertLabelMatchers []*AlertLabelMatcher          `json:"alert_label_matchers"`
	Notifiers          map[string]RoutesNotifierList `json:"notifiers,omitempty"`
}

RoutesOverride is a set of rules that override the default routes

type ValidateDryRunOpts

type ValidateDryRunOpts[M any] struct {
	// SetUnknownReferencesSkip is a set of fields to skip when setting unknown references.
	SetUnknownReferencesSkip []string

	// DryRunDefaults are default values to set during dry-run if the field has a value in config
	// but not in the "plan" ResourceData. This typically happens due to unknown values.
	// E.g., interpolating an ID field for a resource that hasn't been created yet.
	DryRunDefaults map[string]any

	// ModifyAPIModel is used to modify an API model before making the dry-run API call.
	ModifyAPIModel func(M)
}

ValidateDryRunOpts is optional parameters for ValidateDryRun.

Directories

Path Synopsis
Code generated by go generate; DO NOT EDIT.
Code generated by go generate; DO NOT EDIT.
generateintschema
generateintschema maps our Terraform schemas into internal struct representations which can freely convert to and from Terraform ResourceData.
generateintschema maps our Terraform schemas into internal struct representations which can freely convert to and from Terraform ResourceData.
Code generated by go generate; DO NOT EDIT.
Code generated by go generate; DO NOT EDIT.
pkg
configv1/mocks
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.
importmodel
Package importmodel contains models to support importing Terraform resources using "terraform import"
Package importmodel contains models to support importing Terraform resources using "terraform import"
localid
Package localid is used to create fake IDs used for Terraform resources not managed on the server.
Package localid is used to create fake IDs used for Terraform resources not managed on the server.
shared
pkg/container/set
Package set contains set implementations.
Package set contains set implementations.
x
json
Package json contains helper functions for JSON marshaling.
Package json contains helper functions for JSON marshaling.

Jump to

Keyboard shortcuts

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