Documentation ¶
Overview ¶
Package v1alpha represents objects available in API n9/v1alpha
Index ¶
- Constants
- Variables
- func DataDogSiteValidationRule() govy.Rule[string]
- func HistoricalDataRetrievalValidation() govy.Validator[HistoricalDataRetrieval]
- func IsValidRegion(code string, regions []AWSRegion) bool
- func LabelsValidationRules() govy.Validator[Labels]
- func MetadataAnnotationsValidationRules() govy.Validator[MetadataAnnotations]
- func OperatorNames() []string
- func QueryDelayValidation() govy.Validator[QueryDelay]
- func ReleaseChannelNames() []string
- func ReleaseChannelValidation() govy.Rule[ReleaseChannel]
- type AWSRegion
- type AlertMethodType
- type DataSourceType
- type Duration
- type DurationUnit
- type GenericObject
- func (g GenericObject) GetKind() manifest.Kind
- func (g GenericObject) GetManifestSource() string
- func (g GenericObject) GetName() string
- func (g GenericObject) GetOrganization() string
- func (g GenericObject) GetProject() string
- func (g GenericObject) GetVersion() manifest.Version
- func (g GenericObject) SetManifestSource(src string) manifest.Object
- func (g GenericObject) SetOrganization(org string) manifest.Object
- func (g GenericObject) SetProject(project string) manifest.Object
- func (g GenericObject) Validate() error
- type HistoricalDataRetrieval
- type HistoricalRetrievalDuration
- type HistoricalRetrievalDurationUnit
- type Interval
- type Jitter
- type Labels
- type MaxQueryDelay
- type MetadataAnnotations
- type ObjectContext
- type ObjectError
- type ObjectMetadata
- type Operator
- type QueryDelay
- type QueryDelayDefaults
- type ReleaseChannel
- type Timeout
Constants ¶
const GCM = GoogleCloudMonitoring
GCM aliases GoogleCloudMonitoring. Eventually we should solve this inconsistency between the enum name and its string representation.
const HiddenValue = "[hidden]"
HiddenValue can be used as a value of a secret field and is ignored during saving
const MinimalSupportedQueryDelayAgentVersion = "v0.65.0-beta09"
Variables ¶
var ErrInvalidAlertMethodType = errors.New("not a valid AlertMethodType")
var ErrInvalidDataSourceType = errors.New("not a valid DataSourceType")
var ErrInvalidReleaseChannel = fmt.Errorf("not a valid ReleaseChannel, try [%s]", strings.Join(_ReleaseChannelNames, ", "))
Functions ¶
func DataDogSiteValidationRule ¶ added in v0.68.0
func HistoricalDataRetrievalValidation ¶ added in v0.68.0
func HistoricalDataRetrievalValidation() govy.Validator[HistoricalDataRetrieval]
func IsValidRegion ¶ added in v0.59.0
func LabelsValidationRules ¶ added in v0.81.0
func MetadataAnnotationsValidationRules ¶ added in v0.81.0
func MetadataAnnotationsValidationRules() govy.Validator[MetadataAnnotations]
func OperatorNames ¶ added in v0.59.0
func OperatorNames() []string
OperatorNames returns a list of possible string values of Operator.
func QueryDelayValidation ¶ added in v0.68.0
func QueryDelayValidation() govy.Validator[QueryDelay]
func ReleaseChannelNames ¶ added in v0.23.0
func ReleaseChannelNames() []string
ReleaseChannelNames returns a list of possible string values of ReleaseChannel.
func ReleaseChannelValidation ¶ added in v0.68.0
func ReleaseChannelValidation() govy.Rule[ReleaseChannel]
Types ¶
type AWSRegion ¶
func AWSRegions ¶
func AWSRegions() []AWSRegion
AWSRegions returns list of all AWS regions. Data is taken from: https://docs.aws.amazon.com/general/latest/gr/rande.html
type AlertMethodType ¶ added in v0.83.0
type AlertMethodType int
AlertMethodType represents the specific type of alert method.
ENUM(
Webhook = 1 PagerDuty Slack Discord Opsgenie ServiceNow Jira Teams Email )
const ( // AlertMethodTypeWebhook is a AlertMethodType of type Webhook. AlertMethodTypeWebhook AlertMethodType = iota + 1 // AlertMethodTypePagerDuty is a AlertMethodType of type PagerDuty. AlertMethodTypePagerDuty // AlertMethodTypeSlack is a AlertMethodType of type Slack. AlertMethodTypeSlack // AlertMethodTypeDiscord is a AlertMethodType of type Discord. AlertMethodTypeDiscord // AlertMethodTypeOpsgenie is a AlertMethodType of type Opsgenie. AlertMethodTypeOpsgenie // AlertMethodTypeServiceNow is a AlertMethodType of type ServiceNow. AlertMethodTypeServiceNow // AlertMethodTypeJira is a AlertMethodType of type Jira. AlertMethodTypeJira // AlertMethodTypeTeams is a AlertMethodType of type Teams. AlertMethodTypeTeams // AlertMethodTypeEmail is a AlertMethodType of type Email. AlertMethodTypeEmail )
func AlertMethodTypeValues ¶ added in v0.83.0
func AlertMethodTypeValues() []AlertMethodType
AlertMethodTypeValues returns a list of the values for AlertMethodType
func ParseAlertMethodType ¶ added in v0.83.0
func ParseAlertMethodType(name string) (AlertMethodType, error)
ParseAlertMethodType attempts to convert a string to a AlertMethodType.
func (AlertMethodType) IsValid ¶ added in v0.83.0
func (x AlertMethodType) IsValid() bool
IsValid provides a quick way to determine if the typed value is part of the allowed enumerated values
func (AlertMethodType) String ¶ added in v0.83.0
func (x AlertMethodType) String() string
String implements the Stringer interface.
type DataSourceType ¶
type DataSourceType int
DataSourceType represents the type of data source, either Agent or Direct.
Beware that order of these constants is very important existing integrations are saved in db with type = DataSourceType. New integrations always have to be added as last item in this list to get new "type id".
ENUM(
Prometheus = 1 Datadog NewRelic AppDynamics Splunk Lightstep SplunkObservability Dynatrace ThousandEyes Graphite BigQuery Elasticsearch OpenTSDB GrafanaLoki CloudWatch Pingdom AmazonPrometheus Redshift SumoLogic Instana InfluxDB GoogleCloudMonitoring AzureMonitor Generic Honeycomb LogicMonitor AzurePrometheus )
const ( // Prometheus is a DataSourceType of type Prometheus. Prometheus DataSourceType = iota + 1 // Datadog is a DataSourceType of type Datadog. Datadog // NewRelic is a DataSourceType of type NewRelic. NewRelic // AppDynamics is a DataSourceType of type AppDynamics. AppDynamics // Splunk is a DataSourceType of type Splunk. Splunk // Lightstep is a DataSourceType of type Lightstep. Lightstep // SplunkObservability is a DataSourceType of type SplunkObservability. SplunkObservability // Dynatrace is a DataSourceType of type Dynatrace. Dynatrace // ThousandEyes is a DataSourceType of type ThousandEyes. ThousandEyes // Graphite is a DataSourceType of type Graphite. Graphite // BigQuery is a DataSourceType of type BigQuery. BigQuery // Elasticsearch is a DataSourceType of type Elasticsearch. Elasticsearch // OpenTSDB is a DataSourceType of type OpenTSDB. OpenTSDB // GrafanaLoki is a DataSourceType of type GrafanaLoki. GrafanaLoki // CloudWatch is a DataSourceType of type CloudWatch. CloudWatch // Pingdom is a DataSourceType of type Pingdom. Pingdom // AmazonPrometheus is a DataSourceType of type AmazonPrometheus. AmazonPrometheus // Redshift is a DataSourceType of type Redshift. Redshift // SumoLogic is a DataSourceType of type SumoLogic. SumoLogic // Instana is a DataSourceType of type Instana. Instana // InfluxDB is a DataSourceType of type InfluxDB. InfluxDB // GoogleCloudMonitoring is a DataSourceType of type GoogleCloudMonitoring. GoogleCloudMonitoring // AzureMonitor is a DataSourceType of type AzureMonitor. AzureMonitor // Generic is a DataSourceType of type Generic. Generic // Honeycomb is a DataSourceType of type Honeycomb. Honeycomb // LogicMonitor is a DataSourceType of type LogicMonitor. LogicMonitor // AzurePrometheus is a DataSourceType of type AzurePrometheus. AzurePrometheus )
func DataSourceTypeValues ¶ added in v0.60.0
func DataSourceTypeValues() []DataSourceType
DataSourceTypeValues returns a list of the values for DataSourceType
func GetReleaseChannelAlphaEnabledDataSources ¶ added in v0.91.0
func GetReleaseChannelAlphaEnabledDataSources() []DataSourceType
func ParseDataSourceType ¶ added in v0.60.0
func ParseDataSourceType(name string) (DataSourceType, error)
ParseDataSourceType attempts to convert a string to a DataSourceType.
func (DataSourceType) IsValid ¶ added in v0.60.0
func (x DataSourceType) IsValid() bool
IsValid provides a quick way to determine if the typed value is part of the allowed enumerated values
func (DataSourceType) String ¶
func (x DataSourceType) String() string
String implements the Stringer interface.
type Duration ¶ added in v0.61.3
type Duration struct { Value *int `json:"value" validate:"required,min=0,max=86400"` Unit DurationUnit `json:"unit" validate:"required"` }
func GetQueryDelayMax ¶ added in v0.87.0
func GetQueryDelayMax(typ DataSourceType) Duration
func (Duration) GreaterThan ¶ added in v0.87.0
type DurationUnit ¶ added in v0.61.3
type DurationUnit string
const ( Millisecond DurationUnit = "Millisecond" Second DurationUnit = "Second" Minute DurationUnit = "Minute" Hour DurationUnit = "Hour" )
func DurationUnitFromString ¶ added in v0.61.3
func DurationUnitFromString(unit string) (DurationUnit, error)
func (DurationUnit) Duration ¶ added in v0.61.3
func (d DurationUnit) Duration() time.Duration
func (DurationUnit) String ¶ added in v0.61.3
func (d DurationUnit) String() string
type GenericObject ¶ added in v0.42.0
type GenericObject map[string]interface{}
GenericObject represents a generic map[string]interface{} representation of manifest.Object. It's useful for scenarios where an implementation does not want to be tied to specific v1alpha versions.
func (GenericObject) GetKind ¶ added in v0.42.0
func (g GenericObject) GetKind() manifest.Kind
func (GenericObject) GetManifestSource ¶ added in v0.42.0
func (g GenericObject) GetManifestSource() string
func (GenericObject) GetName ¶ added in v0.42.0
func (g GenericObject) GetName() string
func (GenericObject) GetOrganization ¶ added in v0.42.0
func (g GenericObject) GetOrganization() string
func (GenericObject) GetProject ¶ added in v0.42.0
func (g GenericObject) GetProject() string
func (GenericObject) GetVersion ¶ added in v0.42.0
func (g GenericObject) GetVersion() manifest.Version
func (GenericObject) SetManifestSource ¶ added in v0.42.0
func (g GenericObject) SetManifestSource(src string) manifest.Object
func (GenericObject) SetOrganization ¶ added in v0.42.0
func (g GenericObject) SetOrganization(org string) manifest.Object
func (GenericObject) SetProject ¶ added in v0.42.0
func (g GenericObject) SetProject(project string) manifest.Object
func (GenericObject) Validate ¶ added in v0.42.0
func (g GenericObject) Validate() error
type HistoricalDataRetrieval ¶
type HistoricalDataRetrieval struct { MinimumAgentVersion string `json:"minimumAgentVersion,omitempty"` MaxDuration HistoricalRetrievalDuration `json:"maxDuration" validate:"required"` DefaultDuration HistoricalRetrievalDuration `json:"defaultDuration" validate:"required"` // TriggeredBySloCreation is not supported yet, applying it will have no effect TriggeredBySloCreation *HistoricalRetrievalDuration `json:"triggeredBySloCreation,omitempty"` // TriggeredBySloEdit is not supported yet, applying it will have no effect TriggeredBySloEdit *HistoricalRetrievalDuration `json:"triggeredBySloEdit,omitempty"` }
HistoricalDataRetrieval represents optional parameters for agent to regard when configuring TimeMachine-related SLO properties
type HistoricalRetrievalDuration ¶
type HistoricalRetrievalDuration struct { Value *int `json:"value" validate:"required,min=0,max=43200"` Unit HistoricalRetrievalDurationUnit `json:"unit" validate:"required"` }
HistoricalRetrievalDuration struct was previously called Duration. However, this name was too generic since we also needed to introduce a Duration struct for QueryDelay, which allowed for different time units. Time travel is allowed for days/hours/minutes, and query delay can be set to minutes/seconds. Separating those two structs allows for easier validation logic and avoidance of possible mismatches. Also, later on the database level we have time travel duration unit related enum, that's specifically named for data retrieval purposes. Thus, it was easier to split those Durations into separate structures.
func GetDataRetrievalMaxDuration ¶
func GetDataRetrievalMaxDuration(kind manifest.Kind, typ DataSourceType) (HistoricalRetrievalDuration, error)
func (HistoricalRetrievalDuration) BiggerThan ¶
func (d HistoricalRetrievalDuration) BiggerThan(b HistoricalRetrievalDuration) bool
func (HistoricalRetrievalDuration) Duration ¶ added in v0.89.0
func (d HistoricalRetrievalDuration) Duration() time.Duration
func (HistoricalRetrievalDuration) IsZero ¶
func (d HistoricalRetrievalDuration) IsZero() bool
type HistoricalRetrievalDurationUnit ¶
type HistoricalRetrievalDurationUnit string
const ( HRDDay HistoricalRetrievalDurationUnit = "Day" HRDHour HistoricalRetrievalDurationUnit = "Hour" HRDMinute HistoricalRetrievalDurationUnit = "Minute" )
func HistoricalRetrievalDurationUnitFromString ¶
func HistoricalRetrievalDurationUnitFromString(unit string) (HistoricalRetrievalDurationUnit, error)
func (HistoricalRetrievalDurationUnit) IsValid ¶
func (hrdu HistoricalRetrievalDurationUnit) IsValid() bool
func (HistoricalRetrievalDurationUnit) String ¶
func (hrdu HistoricalRetrievalDurationUnit) String() string
type Labels ¶ added in v0.28.0
type Labels map[labelKey][]labelValue
Labels are key-value pairs that can be attached to SLOs, services, projects, and alert policies. Labels are used to select and filter Nobl9 objects.
type MaxQueryDelay ¶ added in v0.87.0
type MaxQueryDelay map[DataSourceType]Duration
type MetadataAnnotations ¶ added in v0.81.0
type MetadataAnnotations map[annotationKey]annotationValue
MetadataAnnotations are non-identifiable key-value pairs that can be attached to SLOs, services, projects, and alert policies. Metadata annotations are used for descriptive purposes only.
type ObjectContext ¶ added in v0.28.0
type ObjectContext interface { GetOrganization() string SetOrganization(org string) manifest.Object }
ObjectContext defines method for interacting with contextual details of the Object which are not directly part of its manifest and are, from the users perspective, read only.
type ObjectError ¶ added in v0.48.0
type ObjectError struct { Object ObjectMetadata `json:"object"` Errors govy.PropertyErrors `json:"errors"` }
func ValidateObject ¶ added in v0.59.0
func (*ObjectError) Error ¶ added in v0.48.0
func (o *ObjectError) Error() string
type ObjectMetadata ¶ added in v0.48.0
type Operator ¶
type Operator int16
Operator is allowed comparing method for labeling sli
func ParseOperator ¶
ParseOperator parses string to Operator
type QueryDelay ¶
type QueryDelayDefaults ¶
type QueryDelayDefaults map[DataSourceType]Duration
func GetQueryDelayDefaults ¶
func GetQueryDelayDefaults() QueryDelayDefaults
GetQueryDelayDefaults serves an exported, single source of truth map that is now a part of v1alpha contract. Its entries are used in two places: in one of internal endpoints serving Query Delay defaults, and in internal telegraf intake configuration, where it is passed to plugins as Query Delay defaults.
WARNING: All string values of this map must satisfy the "customDuration" regex pattern.
func (QueryDelayDefaults) Get ¶ added in v0.71.0
func (q QueryDelayDefaults) Get(at DataSourceType) string
type ReleaseChannel ¶ added in v0.23.0
type ReleaseChannel int
ReleaseChannel /* ENUM(stable = 1, beta, alpha)*/
const ( // ReleaseChannelStable is a ReleaseChannel of type Stable. ReleaseChannelStable ReleaseChannel = iota + 1 // ReleaseChannelBeta is a ReleaseChannel of type Beta. ReleaseChannelBeta // ReleaseChannelAlpha is a ReleaseChannel of type Alpha. ReleaseChannelAlpha )
func ParseReleaseChannel ¶ added in v0.23.0
func ParseReleaseChannel(name string) (ReleaseChannel, error)
ParseReleaseChannel attempts to convert a string to a ReleaseChannel.
func ReleaseChannelValues ¶ added in v0.23.0
func ReleaseChannelValues() []ReleaseChannel
ReleaseChannelValues returns a list of the values for ReleaseChannel
func (ReleaseChannel) IsValid ¶ added in v0.23.0
func (x ReleaseChannel) IsValid() bool
IsValid provides a quick way to determine if the typed value is part of the allowed enumerated values
func (ReleaseChannel) MarshalText ¶ added in v0.23.0
func (r ReleaseChannel) MarshalText() ([]byte, error)
MarshalText implements the text marshaller method.
func (ReleaseChannel) String ¶ added in v0.23.0
func (x ReleaseChannel) String() string
String implements the Stringer interface.
func (*ReleaseChannel) UnmarshalText ¶ added in v0.23.0
func (r *ReleaseChannel) UnmarshalText(text []byte) error
UnmarshalText implements the text unmarshaller method.
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package agent defines Agent object definitions.
|
Package agent defines Agent object definitions. |
Package alert defines Alert object definitions.
|
Package alert defines Alert object definitions. |
Package alertmethod defines AlertMethod object definitions.
|
Package alertmethod defines AlertMethod object definitions. |
Package alertpolicy defines AlertPolicy object definitions and validation.
|
Package alertpolicy defines AlertPolicy object definitions and validation. |
Package alertsilence defines AlertSilence object definitions.
|
Package alertsilence defines AlertSilence object definitions. |
Package annotation defines Annotation object definitions.
|
Package annotation defines Annotation object definitions. |
Package budgetadjustment defines BudgetAdjustment object definitions.
|
Package budgetadjustment defines BudgetAdjustment object definitions. |
Package dataexport defines DataExport object definitions.
|
Package dataexport defines DataExport object definitions. |
Package direct defines Direct object definitions.
|
Package direct defines Direct object definitions. |
Package parser provides parsing methods for v1alpha objects.
|
Package parser provides parsing methods for v1alpha objects. |
Package project defines Project object definitions.
|
Package project defines Project object definitions. |
Package report defines Report object definitions.
|
Package report defines Report object definitions. |
Package rolebinding defines RoleBinding object definitions.
|
Package rolebinding defines RoleBinding object definitions. |
Package service defines Service object definitions.
|
Package service defines Service object definitions. |
Package slo defines SLO object definitions.
|
Package slo defines SLO object definitions. |
Package twindow provides enums and functions to operate with resources related to Time Windows
|
Package twindow provides enums and functions to operate with resources related to Time Windows |
Package usergroup defines UserGroup object definitions.
|
Package usergroup defines UserGroup object definitions. |