Documentation
¶
Index ¶
- Constants
- func AssertionFieldSchema() []configuration.Field
- type AssertionSpec
- type CheckRule
- type Client
- func (c *Client) CreateSyntheticCheck(request SyntheticCheckRequest, dataset string) (map[string]any, error)
- func (c *Client) DeleteSyntheticCheck(checkID string, dataset string) (map[string]any, error)
- func (c *Client) ExecutePrometheusInstantQuery(promQLQuery, dataset string) (map[string]any, error)
- func (c *Client) ExecutePrometheusRangeQuery(promQLQuery, dataset, start, end, step string) (map[string]any, error)
- func (c *Client) ListCheckRules() ([]CheckRule, error)
- func (c *Client) ListSyntheticChecks(dataset string) ([]map[string]any, error)
- func (c *Client) UpdateSyntheticCheck(checkID string, request SyntheticCheckRequest, dataset string) (map[string]any, error)
- type Configuration
- type CreateHTTPSyntheticCheck
- func (c *CreateHTTPSyntheticCheck) Actions() []core.Action
- func (c *CreateHTTPSyntheticCheck) Cancel(ctx core.ExecutionContext) error
- func (c *CreateHTTPSyntheticCheck) Cleanup(ctx core.SetupContext) error
- func (c *CreateHTTPSyntheticCheck) Color() string
- func (c *CreateHTTPSyntheticCheck) Configuration() []configuration.Field
- func (c *CreateHTTPSyntheticCheck) Description() string
- func (c *CreateHTTPSyntheticCheck) Documentation() string
- func (c *CreateHTTPSyntheticCheck) ExampleOutput() map[string]any
- func (c *CreateHTTPSyntheticCheck) Execute(ctx core.ExecutionContext) error
- func (c *CreateHTTPSyntheticCheck) HandleAction(ctx core.ActionContext) error
- func (c *CreateHTTPSyntheticCheck) HandleWebhook(ctx core.WebhookRequestContext) (int, error)
- func (c *CreateHTTPSyntheticCheck) Icon() string
- func (c *CreateHTTPSyntheticCheck) Label() string
- func (c *CreateHTTPSyntheticCheck) Name() string
- func (c *CreateHTTPSyntheticCheck) OutputChannels(configuration any) []core.OutputChannel
- func (c *CreateHTTPSyntheticCheck) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)
- func (c *CreateHTTPSyntheticCheck) Setup(ctx core.SetupContext) error
- type CreateHTTPSyntheticCheckSpec
- type Dash0
- func (d *Dash0) Actions() []core.Action
- func (d *Dash0) Cleanup(ctx core.IntegrationCleanupContext) error
- func (d *Dash0) Components() []core.Component
- func (d *Dash0) Configuration() []configuration.Field
- func (d *Dash0) Description() string
- func (d *Dash0) HandleAction(ctx core.IntegrationActionContext) error
- func (d *Dash0) HandleRequest(ctx core.HTTPRequestContext)
- func (d *Dash0) Icon() string
- func (d *Dash0) Instructions() string
- func (d *Dash0) Label() string
- func (d *Dash0) ListResources(resourceType string, ctx core.ListResourcesContext) ([]core.IntegrationResource, error)
- func (d *Dash0) Name() string
- func (d *Dash0) Sync(ctx core.SyncContext) error
- func (d *Dash0) Triggers() []core.Trigger
- type DeleteHTTPSyntheticCheck
- func (c *DeleteHTTPSyntheticCheck) Actions() []core.Action
- func (c *DeleteHTTPSyntheticCheck) Cancel(ctx core.ExecutionContext) error
- func (c *DeleteHTTPSyntheticCheck) Cleanup(ctx core.SetupContext) error
- func (c *DeleteHTTPSyntheticCheck) Color() string
- func (c *DeleteHTTPSyntheticCheck) Configuration() []configuration.Field
- func (c *DeleteHTTPSyntheticCheck) Description() string
- func (c *DeleteHTTPSyntheticCheck) Documentation() string
- func (c *DeleteHTTPSyntheticCheck) ExampleOutput() map[string]any
- func (c *DeleteHTTPSyntheticCheck) Execute(ctx core.ExecutionContext) error
- func (c *DeleteHTTPSyntheticCheck) HandleAction(ctx core.ActionContext) error
- func (c *DeleteHTTPSyntheticCheck) HandleWebhook(ctx core.WebhookRequestContext) (int, error)
- func (c *DeleteHTTPSyntheticCheck) Icon() string
- func (c *DeleteHTTPSyntheticCheck) Label() string
- func (c *DeleteHTTPSyntheticCheck) Name() string
- func (c *DeleteHTTPSyntheticCheck) OutputChannels(configuration any) []core.OutputChannel
- func (c *DeleteHTTPSyntheticCheck) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)
- func (c *DeleteHTTPSyntheticCheck) Setup(ctx core.SetupContext) error
- type DeleteHTTPSyntheticCheckSpec
- type Header
- type ListIssues
- func (l *ListIssues) Actions() []core.Action
- func (l *ListIssues) Cancel(ctx core.ExecutionContext) error
- func (l *ListIssues) Cleanup(ctx core.SetupContext) error
- func (l *ListIssues) Color() string
- func (l *ListIssues) Configuration() []configuration.Field
- func (l *ListIssues) Description() string
- func (l *ListIssues) Documentation() string
- func (c *ListIssues) ExampleOutput() map[string]any
- func (l *ListIssues) Execute(ctx core.ExecutionContext) error
- func (l *ListIssues) HandleAction(ctx core.ActionContext) error
- func (l *ListIssues) HandleWebhook(ctx core.WebhookRequestContext) (int, error)
- func (l *ListIssues) Icon() string
- func (l *ListIssues) Label() string
- func (l *ListIssues) Name() string
- func (l *ListIssues) OutputChannels(configuration any) []core.OutputChannel
- func (l *ListIssues) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)
- func (l *ListIssues) Setup(ctx core.SetupContext) error
- type ListIssuesNodeMetadata
- type ListIssuesSpec
- type Metadata
- type NotificationCheckRule
- type NotificationData
- type NotificationEvent
- type NotificationIssue
- type NotificationIssueLabel
- type NotificationIssueLabelValue
- type OnNotification
- func (t *OnNotification) Actions() []core.Action
- func (t *OnNotification) Cleanup(ctx core.TriggerContext) error
- func (t *OnNotification) Color() string
- func (t *OnNotification) Configuration() []configuration.Field
- func (t *OnNotification) Description() string
- func (t *OnNotification) Documentation() string
- func (t *OnNotification) ExampleData() map[string]any
- func (t *OnNotification) HandleAction(ctx core.TriggerActionContext) (map[string]any, error)
- func (t *OnNotification) HandleWebhook(ctx core.WebhookRequestContext) (int, error)
- func (t *OnNotification) Icon() string
- func (t *OnNotification) Label() string
- func (t *OnNotification) Name() string
- func (t *OnNotification) OnIntegrationMessage(ctx core.IntegrationMessageContext) error
- func (t *OnNotification) Setup(ctx core.TriggerContext) error
- type OnNotificationConfiguration
- type OnNotificationMetadata
- type PrometheusQueryResult
- type PrometheusResponse
- type PrometheusResponseData
- type QueryPrometheus
- func (q *QueryPrometheus) Actions() []core.Action
- func (q *QueryPrometheus) Cancel(ctx core.ExecutionContext) error
- func (q *QueryPrometheus) Cleanup(ctx core.SetupContext) error
- func (q *QueryPrometheus) Color() string
- func (q *QueryPrometheus) Configuration() []configuration.Field
- func (q *QueryPrometheus) Description() string
- func (q *QueryPrometheus) Documentation() string
- func (c *QueryPrometheus) ExampleOutput() map[string]any
- func (q *QueryPrometheus) Execute(ctx core.ExecutionContext) error
- func (q *QueryPrometheus) HandleAction(ctx core.ActionContext) error
- func (q *QueryPrometheus) HandleWebhook(ctx core.WebhookRequestContext) (int, error)
- func (q *QueryPrometheus) Icon() string
- func (q *QueryPrometheus) Label() string
- func (q *QueryPrometheus) Name() string
- func (q *QueryPrometheus) OutputChannels(configuration any) []core.OutputChannel
- func (q *QueryPrometheus) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)
- func (q *QueryPrometheus) Setup(ctx core.SetupContext) error
- type QueryPrometheusSpec
- type RequestSpec
- type RetrySpec
- type ScheduleSpec
- type SubscriptionConfiguration
- type SyntheticCheckAssertion
- type SyntheticCheckAssertions
- type SyntheticCheckDisplay
- type SyntheticCheckHTTPRequest
- type SyntheticCheckHeader
- type SyntheticCheckMetadata
- type SyntheticCheckPlugin
- type SyntheticCheckPluginSpec
- type SyntheticCheckRequest
- type SyntheticCheckRetries
- type SyntheticCheckRetriesSpec
- type SyntheticCheckSchedule
- type SyntheticCheckTLS
- type SyntheticCheckTopLevelSpec
- type SyntheticCheckTracing
- type UpdateHTTPSyntheticCheck
- func (c *UpdateHTTPSyntheticCheck) Actions() []core.Action
- func (c *UpdateHTTPSyntheticCheck) Cancel(ctx core.ExecutionContext) error
- func (c *UpdateHTTPSyntheticCheck) Cleanup(ctx core.SetupContext) error
- func (c *UpdateHTTPSyntheticCheck) Color() string
- func (c *UpdateHTTPSyntheticCheck) Configuration() []configuration.Field
- func (c *UpdateHTTPSyntheticCheck) Description() string
- func (c *UpdateHTTPSyntheticCheck) Documentation() string
- func (c *UpdateHTTPSyntheticCheck) ExampleOutput() map[string]any
- func (c *UpdateHTTPSyntheticCheck) Execute(ctx core.ExecutionContext) error
- func (c *UpdateHTTPSyntheticCheck) HandleAction(ctx core.ActionContext) error
- func (c *UpdateHTTPSyntheticCheck) HandleWebhook(ctx core.WebhookRequestContext) (int, error)
- func (c *UpdateHTTPSyntheticCheck) Icon() string
- func (c *UpdateHTTPSyntheticCheck) Label() string
- func (c *UpdateHTTPSyntheticCheck) Name() string
- func (c *UpdateHTTPSyntheticCheck) OutputChannels(configuration any) []core.OutputChannel
- func (c *UpdateHTTPSyntheticCheck) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)
- func (c *UpdateHTTPSyntheticCheck) Setup(ctx core.SetupContext) error
- type UpdateHTTPSyntheticCheckSpec
Constants ¶
const ( ChannelNameClear = "clear" ChannelNameDegraded = "degraded" ChannelNameCritical = "critical" )
Output channel names for ListIssues component
const ( // MaxResponseSize limits the size of Prometheus API responses to prevent excessive memory usage // 1MB should be sufficient for most Prometheus queries while preventing abuse MaxResponseSize = 1 * 1024 * 1024 // 1MB )
Variables ¶
This section is empty.
Functions ¶
func AssertionFieldSchema ¶ added in v0.9.0
func AssertionFieldSchema() []configuration.Field
AssertionFieldSchema returns the configuration fields for a single assertion (used by create and update components).
Types ¶
type AssertionSpec ¶ added in v0.9.0
type AssertionSpec struct {
Kind string `mapstructure:"kind"`
Severity string `mapstructure:"severity"`
// Shared fields reused across assertion kinds
Operator string `mapstructure:"operator"` // status_code, timing, ssl, response_header, json_body, text_body
Value string `mapstructure:"value"` // status_code, timing, error_type, ssl, response_header, json_body, text_body
Type string `mapstructure:"type"` // timing (phase: response, request, ssl, connection, dns, total)
Name string `mapstructure:"name"` // response_header (header name)
Expression string `mapstructure:"expression"` // json_body (JSONPath expression)
}
type Client ¶
func NewClient ¶
func NewClient(http core.HTTPContext, ctx core.IntegrationContext) (*Client, error)
func (*Client) CreateSyntheticCheck ¶ added in v0.9.0
func (*Client) DeleteSyntheticCheck ¶ added in v0.9.0
DeleteSyntheticCheck deletes a synthetic check by ID (DELETE).
func (*Client) ExecutePrometheusInstantQuery ¶
func (*Client) ExecutePrometheusRangeQuery ¶
func (*Client) ListCheckRules ¶
func (*Client) ListSyntheticChecks ¶ added in v0.9.0
func (*Client) UpdateSyntheticCheck ¶ added in v0.9.0
func (c *Client) UpdateSyntheticCheck(checkID string, request SyntheticCheckRequest, dataset string) (map[string]any, error)
UpdateSyntheticCheck updates an existing synthetic check by ID (PUT). The check ID is typically from metadata.labels["dash0.com/id"] in a create response.
type Configuration ¶
type CreateHTTPSyntheticCheck ¶ added in v0.9.0
type CreateHTTPSyntheticCheck struct{}
func (*CreateHTTPSyntheticCheck) Actions ¶ added in v0.9.0
func (c *CreateHTTPSyntheticCheck) Actions() []core.Action
func (*CreateHTTPSyntheticCheck) Cancel ¶ added in v0.9.0
func (c *CreateHTTPSyntheticCheck) Cancel(ctx core.ExecutionContext) error
func (*CreateHTTPSyntheticCheck) Cleanup ¶ added in v0.9.0
func (c *CreateHTTPSyntheticCheck) Cleanup(ctx core.SetupContext) error
func (*CreateHTTPSyntheticCheck) Color ¶ added in v0.9.0
func (c *CreateHTTPSyntheticCheck) Color() string
func (*CreateHTTPSyntheticCheck) Configuration ¶ added in v0.9.0
func (c *CreateHTTPSyntheticCheck) Configuration() []configuration.Field
func (*CreateHTTPSyntheticCheck) Description ¶ added in v0.9.0
func (c *CreateHTTPSyntheticCheck) Description() string
func (*CreateHTTPSyntheticCheck) Documentation ¶ added in v0.9.0
func (c *CreateHTTPSyntheticCheck) Documentation() string
func (*CreateHTTPSyntheticCheck) ExampleOutput ¶ added in v0.9.0
func (c *CreateHTTPSyntheticCheck) ExampleOutput() map[string]any
func (*CreateHTTPSyntheticCheck) Execute ¶ added in v0.9.0
func (c *CreateHTTPSyntheticCheck) Execute(ctx core.ExecutionContext) error
func (*CreateHTTPSyntheticCheck) HandleAction ¶ added in v0.9.0
func (c *CreateHTTPSyntheticCheck) HandleAction(ctx core.ActionContext) error
func (*CreateHTTPSyntheticCheck) HandleWebhook ¶ added in v0.9.0
func (c *CreateHTTPSyntheticCheck) HandleWebhook(ctx core.WebhookRequestContext) (int, error)
func (*CreateHTTPSyntheticCheck) Icon ¶ added in v0.9.0
func (c *CreateHTTPSyntheticCheck) Icon() string
func (*CreateHTTPSyntheticCheck) Label ¶ added in v0.9.0
func (c *CreateHTTPSyntheticCheck) Label() string
func (*CreateHTTPSyntheticCheck) Name ¶ added in v0.9.0
func (c *CreateHTTPSyntheticCheck) Name() string
func (*CreateHTTPSyntheticCheck) OutputChannels ¶ added in v0.9.0
func (c *CreateHTTPSyntheticCheck) OutputChannels(configuration any) []core.OutputChannel
func (*CreateHTTPSyntheticCheck) ProcessQueueItem ¶ added in v0.9.0
func (c *CreateHTTPSyntheticCheck) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)
func (*CreateHTTPSyntheticCheck) Setup ¶ added in v0.9.0
func (c *CreateHTTPSyntheticCheck) Setup(ctx core.SetupContext) error
type CreateHTTPSyntheticCheckSpec ¶ added in v0.9.0
type CreateHTTPSyntheticCheckSpec struct {
Name string `mapstructure:"name"`
Dataset string `mapstructure:"dataset"`
Request RequestSpec `mapstructure:"request"`
Schedule ScheduleSpec `mapstructure:"schedule"`
Assertions *[]AssertionSpec `mapstructure:"assertions"`
Retries *RetrySpec `mapstructure:"retries"`
}
type Dash0 ¶
type Dash0 struct{}
func (*Dash0) Cleanup ¶ added in v0.6.0
func (d *Dash0) Cleanup(ctx core.IntegrationCleanupContext) error
func (*Dash0) Components ¶
func (*Dash0) Configuration ¶
func (d *Dash0) Configuration() []configuration.Field
func (*Dash0) Description ¶
func (*Dash0) HandleAction ¶ added in v0.6.0
func (d *Dash0) HandleAction(ctx core.IntegrationActionContext) error
func (*Dash0) HandleRequest ¶
func (d *Dash0) HandleRequest(ctx core.HTTPRequestContext)
func (*Dash0) Instructions ¶
func (*Dash0) ListResources ¶
func (d *Dash0) ListResources(resourceType string, ctx core.ListResourcesContext) ([]core.IntegrationResource, error)
type DeleteHTTPSyntheticCheck ¶ added in v0.9.0
type DeleteHTTPSyntheticCheck struct{}
func (*DeleteHTTPSyntheticCheck) Actions ¶ added in v0.9.0
func (c *DeleteHTTPSyntheticCheck) Actions() []core.Action
func (*DeleteHTTPSyntheticCheck) Cancel ¶ added in v0.9.0
func (c *DeleteHTTPSyntheticCheck) Cancel(ctx core.ExecutionContext) error
func (*DeleteHTTPSyntheticCheck) Cleanup ¶ added in v0.9.0
func (c *DeleteHTTPSyntheticCheck) Cleanup(ctx core.SetupContext) error
func (*DeleteHTTPSyntheticCheck) Color ¶ added in v0.9.0
func (c *DeleteHTTPSyntheticCheck) Color() string
func (*DeleteHTTPSyntheticCheck) Configuration ¶ added in v0.9.0
func (c *DeleteHTTPSyntheticCheck) Configuration() []configuration.Field
func (*DeleteHTTPSyntheticCheck) Description ¶ added in v0.9.0
func (c *DeleteHTTPSyntheticCheck) Description() string
func (*DeleteHTTPSyntheticCheck) Documentation ¶ added in v0.9.0
func (c *DeleteHTTPSyntheticCheck) Documentation() string
func (*DeleteHTTPSyntheticCheck) ExampleOutput ¶ added in v0.9.0
func (c *DeleteHTTPSyntheticCheck) ExampleOutput() map[string]any
func (*DeleteHTTPSyntheticCheck) Execute ¶ added in v0.9.0
func (c *DeleteHTTPSyntheticCheck) Execute(ctx core.ExecutionContext) error
func (*DeleteHTTPSyntheticCheck) HandleAction ¶ added in v0.9.0
func (c *DeleteHTTPSyntheticCheck) HandleAction(ctx core.ActionContext) error
func (*DeleteHTTPSyntheticCheck) HandleWebhook ¶ added in v0.9.0
func (c *DeleteHTTPSyntheticCheck) HandleWebhook(ctx core.WebhookRequestContext) (int, error)
func (*DeleteHTTPSyntheticCheck) Icon ¶ added in v0.9.0
func (c *DeleteHTTPSyntheticCheck) Icon() string
func (*DeleteHTTPSyntheticCheck) Label ¶ added in v0.9.0
func (c *DeleteHTTPSyntheticCheck) Label() string
func (*DeleteHTTPSyntheticCheck) Name ¶ added in v0.9.0
func (c *DeleteHTTPSyntheticCheck) Name() string
func (*DeleteHTTPSyntheticCheck) OutputChannels ¶ added in v0.9.0
func (c *DeleteHTTPSyntheticCheck) OutputChannels(configuration any) []core.OutputChannel
func (*DeleteHTTPSyntheticCheck) ProcessQueueItem ¶ added in v0.9.0
func (c *DeleteHTTPSyntheticCheck) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)
func (*DeleteHTTPSyntheticCheck) Setup ¶ added in v0.9.0
func (c *DeleteHTTPSyntheticCheck) Setup(ctx core.SetupContext) error
type DeleteHTTPSyntheticCheckSpec ¶ added in v0.9.0
type ListIssues ¶
type ListIssues struct{}
func (*ListIssues) Actions ¶
func (l *ListIssues) Actions() []core.Action
func (*ListIssues) Cancel ¶
func (l *ListIssues) Cancel(ctx core.ExecutionContext) error
func (*ListIssues) Cleanup ¶ added in v0.7.0
func (l *ListIssues) Cleanup(ctx core.SetupContext) error
func (*ListIssues) Color ¶
func (l *ListIssues) Color() string
func (*ListIssues) Configuration ¶
func (l *ListIssues) Configuration() []configuration.Field
func (*ListIssues) Description ¶
func (l *ListIssues) Description() string
func (*ListIssues) Documentation ¶
func (l *ListIssues) Documentation() string
func (*ListIssues) ExampleOutput ¶
func (c *ListIssues) ExampleOutput() map[string]any
func (*ListIssues) Execute ¶
func (l *ListIssues) Execute(ctx core.ExecutionContext) error
func (*ListIssues) HandleAction ¶
func (l *ListIssues) HandleAction(ctx core.ActionContext) error
func (*ListIssues) HandleWebhook ¶
func (l *ListIssues) HandleWebhook(ctx core.WebhookRequestContext) (int, error)
func (*ListIssues) Icon ¶
func (l *ListIssues) Icon() string
func (*ListIssues) Label ¶
func (l *ListIssues) Label() string
func (*ListIssues) Name ¶
func (l *ListIssues) Name() string
func (*ListIssues) OutputChannels ¶
func (l *ListIssues) OutputChannels(configuration any) []core.OutputChannel
func (*ListIssues) ProcessQueueItem ¶
func (l *ListIssues) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)
func (*ListIssues) Setup ¶
func (l *ListIssues) Setup(ctx core.SetupContext) error
type ListIssuesNodeMetadata ¶
type ListIssuesNodeMetadata struct {
CheckRules []CheckRule `json:"checkRules" mapstructure:"checkRules"`
}
type ListIssuesSpec ¶
type ListIssuesSpec struct {
CheckRules []string `json:"checkRules,omitempty"`
}
type Metadata ¶
type Metadata struct {
WebhookURL string `json:"webhookUrl" mapstructure:"webhookUrl"`
}
type NotificationCheckRule ¶ added in v0.9.0
type NotificationCheckRule struct {
ID string `json:"id"`
Name string `json:"name"`
For string `json:"for"`
KeepFiringFor string `json:"keepFiringFor"`
Interval string `json:"interval"`
Description string `json:"description"`
URL string `json:"url"`
Expression string `json:"expression"`
Annotations map[string]any `json:"annotations"`
Labels map[string]any `json:"labels"`
Thresholds map[string]any `json:"thresholds"`
}
type NotificationData ¶ added in v0.9.0
type NotificationData struct {
Issue *NotificationIssue `json:"issue"`
}
type NotificationEvent ¶ added in v0.9.0
type NotificationEvent struct {
Type string `json:"type"`
Data NotificationData `json:"data"`
}
type NotificationIssue ¶ added in v0.9.0
type NotificationIssue struct {
ID string `json:"id"`
IssueIdentifier string `json:"issueIdentifier"`
Start string `json:"start"`
End string `json:"end"`
Status string `json:"status"`
Summary string `json:"summary"`
URL string `json:"url"`
Dataset string `json:"dataset"`
Description string `json:"description"`
CheckRules []NotificationCheckRule `json:"checkrules"`
Labels []NotificationIssueLabel `json:"labels"`
}
type NotificationIssueLabel ¶ added in v0.9.0
type NotificationIssueLabel struct {
Key string `json:"key"`
Value NotificationIssueLabelValue `json:"value"`
}
type NotificationIssueLabelValue ¶ added in v0.9.0
type NotificationIssueLabelValue struct {
StringValue string `json:"stringValue"`
}
type OnNotification ¶ added in v0.9.0
type OnNotification struct{}
func (*OnNotification) Actions ¶ added in v0.9.0
func (t *OnNotification) Actions() []core.Action
func (*OnNotification) Cleanup ¶ added in v0.9.0
func (t *OnNotification) Cleanup(ctx core.TriggerContext) error
func (*OnNotification) Color ¶ added in v0.9.0
func (t *OnNotification) Color() string
func (*OnNotification) Configuration ¶ added in v0.9.0
func (t *OnNotification) Configuration() []configuration.Field
func (*OnNotification) Description ¶ added in v0.9.0
func (t *OnNotification) Description() string
func (*OnNotification) Documentation ¶ added in v0.9.0
func (t *OnNotification) Documentation() string
func (*OnNotification) ExampleData ¶ added in v0.9.0
func (t *OnNotification) ExampleData() map[string]any
func (*OnNotification) HandleAction ¶ added in v0.9.0
func (t *OnNotification) HandleAction(ctx core.TriggerActionContext) (map[string]any, error)
func (*OnNotification) HandleWebhook ¶ added in v0.9.0
func (t *OnNotification) HandleWebhook(ctx core.WebhookRequestContext) (int, error)
func (*OnNotification) Icon ¶ added in v0.9.0
func (t *OnNotification) Icon() string
func (*OnNotification) Label ¶ added in v0.9.0
func (t *OnNotification) Label() string
func (*OnNotification) Name ¶ added in v0.9.0
func (t *OnNotification) Name() string
func (*OnNotification) OnIntegrationMessage ¶ added in v0.9.0
func (t *OnNotification) OnIntegrationMessage(ctx core.IntegrationMessageContext) error
func (*OnNotification) Setup ¶ added in v0.9.0
func (t *OnNotification) Setup(ctx core.TriggerContext) error
type OnNotificationConfiguration ¶ added in v0.9.0
type OnNotificationConfiguration struct {
Statuses []string `json:"statuses" mapstructure:"statuses"`
}
type OnNotificationMetadata ¶ added in v0.9.0
type OnNotificationMetadata struct {
SubscriptionID string `json:"subscriptionId,omitempty" mapstructure:"subscriptionId"`
}
type PrometheusQueryResult ¶
type PrometheusResponse ¶
type PrometheusResponse struct {
Status string `json:"status"`
Data PrometheusResponseData `json:"data"`
}
type PrometheusResponseData ¶
type PrometheusResponseData struct {
ResultType string `json:"resultType"`
Result []PrometheusQueryResult `json:"result"`
}
type QueryPrometheus ¶
type QueryPrometheus struct{}
func (*QueryPrometheus) Actions ¶
func (q *QueryPrometheus) Actions() []core.Action
func (*QueryPrometheus) Cancel ¶
func (q *QueryPrometheus) Cancel(ctx core.ExecutionContext) error
func (*QueryPrometheus) Cleanup ¶ added in v0.7.0
func (q *QueryPrometheus) Cleanup(ctx core.SetupContext) error
func (*QueryPrometheus) Color ¶
func (q *QueryPrometheus) Color() string
func (*QueryPrometheus) Configuration ¶
func (q *QueryPrometheus) Configuration() []configuration.Field
func (*QueryPrometheus) Description ¶
func (q *QueryPrometheus) Description() string
func (*QueryPrometheus) Documentation ¶
func (q *QueryPrometheus) Documentation() string
func (*QueryPrometheus) ExampleOutput ¶
func (c *QueryPrometheus) ExampleOutput() map[string]any
func (*QueryPrometheus) Execute ¶
func (q *QueryPrometheus) Execute(ctx core.ExecutionContext) error
func (*QueryPrometheus) HandleAction ¶
func (q *QueryPrometheus) HandleAction(ctx core.ActionContext) error
func (*QueryPrometheus) HandleWebhook ¶
func (q *QueryPrometheus) HandleWebhook(ctx core.WebhookRequestContext) (int, error)
func (*QueryPrometheus) Icon ¶
func (q *QueryPrometheus) Icon() string
func (*QueryPrometheus) Label ¶
func (q *QueryPrometheus) Label() string
func (*QueryPrometheus) Name ¶
func (q *QueryPrometheus) Name() string
func (*QueryPrometheus) OutputChannels ¶
func (q *QueryPrometheus) OutputChannels(configuration any) []core.OutputChannel
func (*QueryPrometheus) ProcessQueueItem ¶
func (q *QueryPrometheus) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)
func (*QueryPrometheus) Setup ¶
func (q *QueryPrometheus) Setup(ctx core.SetupContext) error
type QueryPrometheusSpec ¶
type QueryPrometheusSpec struct {
Query string `json:"query"`
Dataset string `json:"dataset"`
Type string `json:"type"` // "instant" or "range"
Start *string `json:"start,omitempty"` // For range queries, e.g., "now-5m"
End *string `json:"end,omitempty"` // For range queries, e.g., "now"
Step *string `json:"step,omitempty"` // For range queries, e.g., "15s"
}
type RequestSpec ¶ added in v0.9.0
type ScheduleSpec ¶ added in v0.9.0
type SubscriptionConfiguration ¶ added in v0.9.0
type SubscriptionConfiguration struct{}
type SyntheticCheckAssertion ¶ added in v0.9.0
SyntheticCheckAssertion represents a single assertion in a synthetic check.
type SyntheticCheckAssertions ¶ added in v0.9.0
type SyntheticCheckAssertions struct {
CriticalAssertions []SyntheticCheckAssertion `json:"criticalAssertions"`
DegradedAssertions []SyntheticCheckAssertion `json:"degradedAssertions"`
}
SyntheticCheckAssertions groups critical and degraded assertions.
func BuildSyntheticCheckAssertions ¶ added in v0.9.0
func BuildSyntheticCheckAssertions(assertions *[]AssertionSpec) SyntheticCheckAssertions
BuildSyntheticCheckAssertions builds the API assertions payload from spec (shared by create and update components).
type SyntheticCheckDisplay ¶ added in v0.9.0
type SyntheticCheckDisplay struct {
Name string `json:"name"`
}
SyntheticCheckDisplay contains the display name for a synthetic check.
type SyntheticCheckHTTPRequest ¶ added in v0.9.0
type SyntheticCheckHTTPRequest struct {
Method string `json:"method"`
URL string `json:"url"`
Headers []SyntheticCheckHeader `json:"headers"`
QueryParameters []any `json:"queryParameters"`
Body *string `json:"body,omitempty"`
Redirects string `json:"redirects"`
TLS SyntheticCheckTLS `json:"tls"`
Tracing SyntheticCheckTracing `json:"tracing"`
}
SyntheticCheckHTTPRequest defines the HTTP request configuration.
type SyntheticCheckHeader ¶ added in v0.9.0
SyntheticCheckHeader represents an HTTP header key-value pair.
type SyntheticCheckMetadata ¶ added in v0.9.0
type SyntheticCheckMetadata struct {
Name string `json:"name"`
Labels map[string]any `json:"labels"`
}
SyntheticCheckMetadata contains the check name and labels.
type SyntheticCheckPlugin ¶ added in v0.9.0
type SyntheticCheckPlugin struct {
Display SyntheticCheckDisplay `json:"display"`
Kind string `json:"kind"`
Spec SyntheticCheckPluginSpec `json:"spec"`
}
SyntheticCheckPlugin contains the check type, display metadata, and specification.
type SyntheticCheckPluginSpec ¶ added in v0.9.0
type SyntheticCheckPluginSpec struct {
Request SyntheticCheckHTTPRequest `json:"request"`
Assertions SyntheticCheckAssertions `json:"assertions"`
Retries SyntheticCheckRetries `json:"retries"`
}
SyntheticCheckPluginSpec contains the HTTP request, assertions, and retries for a synthetic check.
type SyntheticCheckRequest ¶ added in v0.9.0
type SyntheticCheckRequest struct {
Kind string `json:"kind"`
Metadata SyntheticCheckMetadata `json:"metadata"`
Spec SyntheticCheckTopLevelSpec `json:"spec"`
}
SyntheticCheckRequest represents the full request payload for creating a synthetic check. Matches the Dash0 API envelope: kind + metadata + spec.
func BuildSyntheticCheckRequest ¶ added in v0.9.0
func BuildSyntheticCheckRequest(name string, req RequestSpec, sched ScheduleSpec, assertions SyntheticCheckAssertions, retries *RetrySpec) SyntheticCheckRequest
BuildSyntheticCheckRequest builds the API request payload from spec fields (shared by create and update components).
type SyntheticCheckRetries ¶ added in v0.9.0
type SyntheticCheckRetries struct {
Kind string `json:"kind"`
Spec SyntheticCheckRetriesSpec `json:"spec"`
}
SyntheticCheckRetries defines retry behavior for failed checks.
type SyntheticCheckRetriesSpec ¶ added in v0.9.0
type SyntheticCheckRetriesSpec struct {
Attempts int `json:"attempts"`
Delay string `json:"delay"`
}
SyntheticCheckRetriesSpec contains the retry parameters.
type SyntheticCheckSchedule ¶ added in v0.9.0
type SyntheticCheckSchedule struct {
Interval string `json:"interval"`
Locations []string `json:"locations"`
Strategy string `json:"strategy"`
}
SyntheticCheckSchedule defines how often and where a check runs.
type SyntheticCheckTLS ¶ added in v0.9.0
type SyntheticCheckTLS struct {
AllowInsecure bool `json:"allowInsecure"`
}
SyntheticCheckTLS holds TLS configuration.
type SyntheticCheckTopLevelSpec ¶ added in v0.9.0
type SyntheticCheckTopLevelSpec struct {
Enabled bool `json:"enabled"`
Schedule SyntheticCheckSchedule `json:"schedule"`
Plugin SyntheticCheckPlugin `json:"plugin"`
}
SyntheticCheckTopLevelSpec wraps the plugin, schedule, retries, and enabled flag.
type SyntheticCheckTracing ¶ added in v0.9.0
type SyntheticCheckTracing struct {
AddTracingHeaders bool `json:"addTracingHeaders"`
}
SyntheticCheckTracing holds tracing configuration.
type UpdateHTTPSyntheticCheck ¶ added in v0.9.0
type UpdateHTTPSyntheticCheck struct{}
func (*UpdateHTTPSyntheticCheck) Actions ¶ added in v0.9.0
func (c *UpdateHTTPSyntheticCheck) Actions() []core.Action
func (*UpdateHTTPSyntheticCheck) Cancel ¶ added in v0.9.0
func (c *UpdateHTTPSyntheticCheck) Cancel(ctx core.ExecutionContext) error
func (*UpdateHTTPSyntheticCheck) Cleanup ¶ added in v0.9.0
func (c *UpdateHTTPSyntheticCheck) Cleanup(ctx core.SetupContext) error
func (*UpdateHTTPSyntheticCheck) Color ¶ added in v0.9.0
func (c *UpdateHTTPSyntheticCheck) Color() string
func (*UpdateHTTPSyntheticCheck) Configuration ¶ added in v0.9.0
func (c *UpdateHTTPSyntheticCheck) Configuration() []configuration.Field
func (*UpdateHTTPSyntheticCheck) Description ¶ added in v0.9.0
func (c *UpdateHTTPSyntheticCheck) Description() string
func (*UpdateHTTPSyntheticCheck) Documentation ¶ added in v0.9.0
func (c *UpdateHTTPSyntheticCheck) Documentation() string
func (*UpdateHTTPSyntheticCheck) ExampleOutput ¶ added in v0.9.0
func (c *UpdateHTTPSyntheticCheck) ExampleOutput() map[string]any
func (*UpdateHTTPSyntheticCheck) Execute ¶ added in v0.9.0
func (c *UpdateHTTPSyntheticCheck) Execute(ctx core.ExecutionContext) error
func (*UpdateHTTPSyntheticCheck) HandleAction ¶ added in v0.9.0
func (c *UpdateHTTPSyntheticCheck) HandleAction(ctx core.ActionContext) error
func (*UpdateHTTPSyntheticCheck) HandleWebhook ¶ added in v0.9.0
func (c *UpdateHTTPSyntheticCheck) HandleWebhook(ctx core.WebhookRequestContext) (int, error)
func (*UpdateHTTPSyntheticCheck) Icon ¶ added in v0.9.0
func (c *UpdateHTTPSyntheticCheck) Icon() string
func (*UpdateHTTPSyntheticCheck) Label ¶ added in v0.9.0
func (c *UpdateHTTPSyntheticCheck) Label() string
func (*UpdateHTTPSyntheticCheck) Name ¶ added in v0.9.0
func (c *UpdateHTTPSyntheticCheck) Name() string
func (*UpdateHTTPSyntheticCheck) OutputChannels ¶ added in v0.9.0
func (c *UpdateHTTPSyntheticCheck) OutputChannels(configuration any) []core.OutputChannel
func (*UpdateHTTPSyntheticCheck) ProcessQueueItem ¶ added in v0.9.0
func (c *UpdateHTTPSyntheticCheck) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)
func (*UpdateHTTPSyntheticCheck) Setup ¶ added in v0.9.0
func (c *UpdateHTTPSyntheticCheck) Setup(ctx core.SetupContext) error
type UpdateHTTPSyntheticCheckSpec ¶ added in v0.9.0
type UpdateHTTPSyntheticCheckSpec struct {
CheckID string `mapstructure:"checkId"`
Name string `mapstructure:"name"`
Dataset string `mapstructure:"dataset"`
Request RequestSpec `mapstructure:"request"`
Schedule ScheduleSpec `mapstructure:"schedule"`
Assertions *[]AssertionSpec `mapstructure:"assertions"`
Retries *RetrySpec `mapstructure:"retries"`
}
UpdateHTTPSyntheticCheckSpec has CheckID plus the same spec fields as create (full replacement).