Documentation ¶
Overview ¶
Code generated by go generate; DO NOT EDIT.
Index ¶
- Constants
- Variables
- func BlackholeAlertNotifierFromModel(n *models.Configv1Notifier) (*intschema.BlackholeAlertNotifier, error)
- func BoolPtr(b bool) *bool
- func ClassicDashboardFromModel(m *models.Configv1GrafanaDashboard) (*intschema.ClassicDashboard, error)
- func CollectionFromModel(m *models.Configv1Collection) (*intschema.Collection, error)
- func CollectionTypeSlugFromID(id string) (collType configmodels.Configv1CollectionReferenceType, slug string, ok bool)
- func CollectionTypeSlugToID(collType configmodels.Configv1CollectionReferenceType, slug string) string
- func DashboardFromModel(m *models.Configv1Dashboard) (*intschema.Dashboard, error)
- func DataBucketFromModel(b *models.Configv1Bucket) *intschema.DataBucket
- func DataCollectionFromModel(b *models.Configv1Collection) *intschema.DataCollection
- func DataServiceFromModel(s *configmodels.Configv1Service) *intschema.DataService
- func DatasetFromModel(m *models.Configv1Dataset) (*intschema.Dataset, error)
- func DerivedLabelFromModel(m *models.Configv1DerivedLabel) (*intschema.DerivedLabel, error)
- func DerivedMetricFromModel(m *models.Configv1DerivedMetric) (*intschema.DerivedMetric, error)
- func DropRuleFromModel(m *models.Configv1DropRule) (*intschema.DropRule, error)
- func EmailAlertNotifierFromModel(m *models.Configv1Notifier) (*intschema.EmailAlertNotifier, error)
- func GcpMetricsIntegrationFromModel(m *models.Configv1GcpMetricsIntegration) (*intschema.GcpMetricsIntegration, error)
- func MappingRuleFromModel(m *models.Configv1MappingRule) (*intschema.MappingRule, error)
- func MonitorFromModel(m *models.Configv1Monitor) (*intschema.Monitor, error)
- func NotificationPolicyFromModel(m *models.Configv1NotificationPolicy) (*intschema.NotificationPolicy, error)
- func OpsgenieAlertNotifierFromModel(m *models.Configv1Notifier) (*intschema.OpsgenieAlertNotifier, error)
- func PagerdutyAlertNotifierFromModel(m *models.Configv1Notifier) (*intschema.PagerdutyAlertNotifier, error)
- func ParseOptionalDuration(v string) (time.Duration, error)
- func Provider() *schema.Provider
- func RecordingRuleFromModel(m *models.Configv1RecordingRule) (*intschema.RecordingRule, error)
- func ResourcePoolsConfigFromModel(m *apimodels.Configv1ResourcePools) (*intschema.ResourcePoolsConfig, error)
- func RollupRuleFromModel(m *models.Configv1RollupRule) (*intschema.RollupRule, error)
- func ServiceAccountFromModel(m *models.Configv1ServiceAccount) (*intschema.ServiceAccount, error)
- func SlackAlertNotifierFromModel(m *models.Configv1Notifier) (*intschema.SlackAlertNotifier, error)
- func TeamFromModel(m *models.Configv1Team) (*intschema.Team, error)
- func TraceJaegerRemoteSamplingStrategyFromModel(m *models.Configv1TraceJaegerRemoteSamplingStrategy) (*intschema.TraceJaegerRemoteSamplingStrategy, error)
- func TraceMetricsRuleFromModel(r *models.Configv1TraceMetricsRule) (*intschema.TraceMetricsRule, error)
- func VictoropsAlertNotifierFromModel(m *models.Configv1Notifier) (*intschema.VictoropsAlertNotifier, error)
- func WebhookAlertNotifierFromModel(m *models.Configv1Notifier) (*intschema.WebhookAlertNotifier, error)
- type AlertLabelMatcher
- type DashboardMetadata
- type LabelMatcherType
- type NotificationPolicyData
- type OptionalMap
- type OptionalString
- type OptionalValue
- type ResourceGetter
- type Routes
- type RoutesNotifierList
- type RoutesNotifierListGroupBy
- type RoutesNotifierListNotifier
- type RoutesOverride
- type ValidateDryRunOpts
Constants ¶
const LocalName = "local/chronosphereio/chronosphere"
LocalName is the provider name that is used for local installation.
const OtelMetricsIngestionID = "otel_metrics_ingestion_singleton"
OtelMetricsIngestionID is the static ID of the global OtelMetricsIngestion singleton.
const ResourcePoolsID = "resource_pool_singleton"
ResourcePoolsID is the static ID of the global ResourcePools singleton.
const TraceTailSamplingRulesID = "trace_tail_sampling_singleton"
TraceTailSamplingRulesID is the static ID of the global TraceTailSamplingRules singleton.
Variables ¶
var BlackHoleAlertNotifierDryRunCount atomic.Int64
BlackHoleAlertNotifierDryRunCount tracks how many times dry run is run during validation for testing.
var BucketDryRunCount atomic.Int64
BucketDryRunCount tracks how many times dry run is run during validation for testing.
var ClassicDashboardDryRunCount atomic.Int64
ClassicDashboardDryRunCount tracks how many times dry run is run during validation for testing.
var CollectionDryRunCount atomic.Int64
CollectionDryRunCount tracks how many times dry run is run during validation for testing.
var DashboardDryRunCount atomic.Int64
DashboardDryRunCount tracks how many times dry run is run during validation for testing.
var DatasetDryRunCount atomic.Int64
DatasetDryRunCount tracks how many times dry run is run during validation for testing.
var DerivedLabelDryRunCount atomic.Int64
DerivedLabelDryRunCount tracks how many times dry run is run during validation for testing.
var DerivedMetricDryRunCount atomic.Int64
DerivedMetricRunCount tracks how many times dry run is run during validation for testing.
var DropRuleDryRunCount atomic.Int64
DropRuleDryRunCount tracks how many times dry run is run during validation for testing.
var EmailAlertNotifierDryRunCount atomic.Int64
EmailAlertNotifierDryRunCount tracks how many times dry run is run during validation for testing.
var GcpMetricsIntegrationDryRunCount atomic.Int64
GcpMetricsIntegrationDryRunCount tracks how many times dry run is run during validation for testing.
var MappingRuleDryRunCount atomic.Int64
MappingRuleDryRunCount tracks how many times dry run is run during validation for testing.
var MonitorDryRunCount atomic.Int64
MonitorDryRunCount tracks how many times dry run is run during validation for testing.
var NotificationPolicyDryRunCount atomic.Int64
NotificationPolicyDryRunCount tracks how many times dry run is run during validation for testing.
var OpsGenieAlertNotifierDryRunCount atomic.Int64
OpsGenieAlertNotifierDryRunCount tracks how many times dry run is run during validation for testing.
var OtelMetricsIngestionDryRunCount atomic.Int64
OtelMetricsIngestionDryRunCount tracks how many times dry run is run during validation for testing.
var PagerDutyAlertNotifierDryRunCount atomic.Int64
PagerDutyAlertNotifierDryRunCount tracks how many times dry run is run during validation for testing.
var RecordingRuleDryRunCount atomic.Int64
RecordingRuleDryRunCount tracks how many times dry run is run during validation for testing.
var ResourcePoolsConfigDryRunCount atomic.Int64
ResourcePoolsConfigDryRunCount tracks how many times dry run is run during validation for testing.
var RollupRuleDryRunCount atomic.Int64
RollupRuleDryRunCount tracks how many times dry run is run during validation for testing.
var SlackAlertNotifierDryRunCount atomic.Int64
SlackAlertNotifierDryRunCount tracks how many times dry run is run during validation for testing.
var TeamDryRunCount atomic.Int64
TeamDryRunCount tracks how many times dry run is run during validation for testing.
var TraceJaegerRemoteSamplingStrategyDryRunCount atomic.Int64
TraceJaegerRemoteSamplingStrategyDryRunCount tracks how many times dry run is run during validation for testing.
var TraceMetricsRuleDryRunCount atomic.Int64
TraceMetricsRuleDryRunCount tracks how many times dry run is run during validation for testing.
var TraceTailSamplingRulesDryRunCount atomic.Int64
TraceTailSamplingRulesDryRunCount tracks how many times dry run is run during validation for testing.
var VictorOpsAlertNotifierDryRunCount atomic.Int64
VictorOpsAlertNotifierDryRunCount tracks how many times dry run is run during validation for testing.
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 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 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 PagerdutyAlertNotifierFromModel ¶
func PagerdutyAlertNotifierFromModel( m *models.Configv1Notifier, ) (*intschema.PagerdutyAlertNotifier, error)
func ParseOptionalDuration ¶
ParseOptionalDuration is similar to ParseDuration, but treats empty string as 0.
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 TraceJaegerRemoteSamplingStrategyFromModel ¶
func TraceJaegerRemoteSamplingStrategyFromModel( m *models.Configv1TraceJaegerRemoteSamplingStrategy, ) (*intschema.TraceJaegerRemoteSamplingStrategy, error)
func TraceMetricsRuleFromModel ¶
func TraceMetricsRuleFromModel(r *models.Configv1TraceMetricsRule) (*intschema.TraceMetricsRule, error)
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 ¶
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 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 ¶
func (n *NotificationPolicyData) ToModel() (*configmodels.Configv1NotificationPolicy, error)
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 ¶
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 ¶
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 // ModifyAPIModel is used to modify an API model before making the dry-run API call. ModifyAPIModel func(M) }
ValidateDryRunOpts is optional parameters for ValidateDryRun.
Source Files ¶
- collection_ref_id.go
- dashboard_meta.go
- data_source_bucket.go
- data_source_collection.go
- data_source_notification_policy.go
- data_source_service.go
- generate.go
- generated_resources.gen.go
- generic_resource.go
- helpers.go
- notification_policy_data.go
- notifier_http_config.go
- optional_field.go
- provider.go
- resource_blackhole_alert_notifier.go
- resource_bucket.go
- resource_classic_dashboard.go
- resource_collection.go
- resource_dashboard.go
- resource_dataset.go
- resource_derived_label.go
- resource_derived_metric.go
- resource_drop_rule.go
- resource_email_alert_notifier.go
- resource_gcp_metrics_integration.go
- resource_mapping_rule.go
- resource_monitor.go
- resource_notification_policy.go
- resource_notification_policy_independent.go
- resource_opsgenie_alert_notifier.go
- resource_otel_metrics_ingestion.go
- resource_pagerduty_alert_notifier.go
- resource_recording_rule.go
- resource_resource_pools_config.go
- resource_rollup_rule.go
- resource_service_account.go
- resource_slack_alert_notifier.go
- resource_team.go
- resource_trace_jaeger_remote_sampling_strategy.go
- resource_trace_metrics_rule.go
- resource_trace_tail_sampling_rules.go
- resource_victorops_alert_notifier.go
- resource_webhook_alert_notifier.go
- schema_reader.go
- set_unknown_references.go
- trace_common.go
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. |