extslos

package
v1.0.27 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2026 License: MIT Imports: 16 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	TargetType = "com.steadybit.extension_splunk.slo"
)

Variables

View Source
var (
	RestyClient *resty.Client
)

Functions

func NewSLODiscovery

func NewSLODiscovery() discovery_kit_sdk.TargetDiscovery

func NewSloStateCheckAction

func NewSloStateCheckAction() action_kit_sdk.Action[SloCheckState]

func SLOCheckStatus

func SLOCheckStatus(ctx context.Context, state *SloCheckState, client *resty.Client) (*action_kit_api.StatusResult, error)

Types

type CalculatedParameters

type CalculatedParameters struct {
	FireLasting      string  `json:"fireLasting"`
	PercentOfLasting float64 `json:"percentOfLasting"`
}

type Inputs

type Inputs struct {
	GoodEventsLabel  string `json:"goodEventsLabel"`
	ProgramText      string `json:"programText"`
	TotalEventsLabel string `json:"totalEventsLabel"`
}

type Response

type Response struct {
	Count   int   `json:"count"`
	Results []Slo `json:"results"`
}

type Rule

type Rule struct {
	CalculatedParameters CalculatedParameters `json:"calculatedParameters"`
	DetectLabel          string               `json:"detectLabel"`
	Disabled             bool                 `json:"disabled"`
	Notifications        []string             `json:"notifications"`
	ParameterizedBody    string               `json:"parameterizedBody"`
	ParameterizedSubject string               `json:"parameterizedSubject"`
	Severity             string               `json:"severity"`
}

type SLOAlertRule

type SLOAlertRule struct {
	AlertsTriggered bool   `json:"alertsTriggered"`
	Rules           []Rule `json:"rules"`
	Type            string `json:"type"`
}

type SLOSearchConfig

type SLOSearchConfig struct {
	BreachAlertsTriggered          bool     `json:"breachAlertsTriggered"`
	BurnRateAlertsTriggered        bool     `json:"burnRateAlertsTriggered"`
	ErrorBudgetLeftAlertsTriggered bool     `json:"errorBudgetLeftAlertsTriggered"`
	SLOIds                         []string `json:"sloIds"`
}

type Slo

type Slo struct {
	Created       int64    `json:"created"`
	Creator       string   `json:"creator"`
	Description   *string  `json:"description"` // pointer to allow null
	ID            string   `json:"id"`
	Indicator     string   `json:"indicator"`
	Inputs        Inputs   `json:"inputs"`
	LastUpdated   int64    `json:"lastUpdated"`
	LastUpdatedBy string   `json:"lastUpdatedBy"`
	Metadata      []string `json:"metadata"`
	Name          string   `json:"name"`
	Targets       []Target `json:"targets"`
	Type          string   `json:"type"`
}

type SloCheckState

type SloCheckState struct {
	SloID              string
	SloName            string
	CheckNewAlertsOnly bool
	Start              time.Time
	End                time.Time
	ExpectedState      string
	StateCheckMode     string
	StateCheckSuccess  bool
	FailEarly          bool
	// DeviationSeen and DeviationTitle are used in 'fail at end' mode (FailEarly = false) to remember
	// that a deviating state was observed during the step so the failure can be reported once the step ends.
	DeviationSeen  bool
	DeviationTitle string
}

type SloStateCheckAction

type SloStateCheckAction struct{}

func (*SloStateCheckAction) Describe

func (*SloStateCheckAction) NewEmptyState

func (m *SloStateCheckAction) NewEmptyState() SloCheckState

func (*SloStateCheckAction) Start

func (*SloStateCheckAction) Status

type Target

type Target struct {
	CompliancePeriod string         `json:"compliancePeriod"`
	SLO              float64        `json:"slo"`
	SLOAlertRules    []SLOAlertRule `json:"sloAlertRules"`
	Type             string         `json:"type"`
}

Jump to

Keyboard shortcuts

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