reactor

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2024 License: MIT Imports: 33 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Anomaly

type Anomaly struct {
	AccountID          string        `json:"accountId"`
	AnomalyDetailsLink string        `json:"anomalyDetailsLink"`
	AnomalyEndDate     time.Time     `json:"anomalyEndDate"`
	AnomalyID          string        `json:"anomalyId"`
	AnomalyScore       AnomalyScore  `json:"anomalyScore"`
	AnomalyStartDate   time.Time     `json:"anomalyStartDate"`
	DimensionalValue   string        `json:"dimensionalValue"`
	Impact             AnomalyImpact `json:"impact"`
	MonitorArn         string        `json:"monitorArn"`
	RootCauses         []RootCause   `json:"rootCauses"`
	SubscriptionID     string        `json:"subscriptionId"`
	SubscriptionName   string        `json:"subscriptionName"`
}

type AnomalyImpact

type AnomalyImpact struct {
	MaxImpact             float64 `json:"maxImpact"`
	TotalActualSpend      float64 `json:"totalActualSpend"`
	TotalExpectedSpend    float64 `json:"totalExpectedSpend"`
	TotalImpact           float64 `json:"totalImpact"`
	TotalImpactPercentage float64 `json:"totalImpactPercentage"`
}

type AnomalyScore

type AnomalyScore struct {
	CurrentScore float64 `json:"currentScore"`
	MaxScore     float64 `json:"maxScore"`
}

type Graph added in v0.3.0

type Graph struct {
	// contains filtered or unexported fields
}

type GraphGenerator

type GraphGenerator struct {
	// contains filtered or unexported fields
}

func (*GraphGenerator) Generate

func (g *GraphGenerator) Generate(ctx context.Context, anomaly Anomaly) ([]*Graph, error)

type Handler

type Handler struct {
	// contains filtered or unexported fields
}

func New

func New(ctx context.Context, opts ...Option) (*Handler, error)

func (*Handler) ProvideFeedback

func (h *Handler) ProvideFeedback(ctx context.Context, annomalyID string, actionID string) error

func (*Handler) ServeHTTP

func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type Option

type Option func(*optionParams)

func WithAWSConfig

func WithAWSConfig(cfg *aws.Config) Option

func WithLogger

func WithLogger(logger *slog.Logger) Option

func WithNoErrorReport added in v0.2.0

func WithNoErrorReport() Option

func WithSlackBotToken

func WithSlackBotToken(token string) Option

func WithSlackChannel

func WithSlackChannel(channel string) Option

func WithSlackSignalSecret

func WithSlackSignalSecret(secret string) Option

func WithTemplate

func WithTemplate(template string) Option

type RootCause

type RootCause struct {
	LinkedAccount     string `json:"linkedAccount"`
	LinkedAccountName string `json:"linkedAccountName"`
	Region            string `json:"region"`
	Service           string `json:"service"`
	UsageType         string `json:"usageType"`
}

Jump to

Keyboard shortcuts

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