exporter

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TermOnDemand   string = "JRTCKXETXF"
	TermPerHour    string = "6YS6EN2CT7"
	HealthEndpoint string = "global.health.amazonaws.com"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Details

type Details struct {
	Unit         string
	EndRange     string
	Description  string
	AppliesTo    []string
	RateCode     string
	BeginRange   string
	PricePerUnit map[string]string
}

type HealthEvent

type HealthEvent struct {
	Arn               *string
	AffectedAccounts  []string
	EventScope        healthTypes.EventScopeCode
	Event             *healthTypes.Event
	EventDescription  *healthTypes.EventDescription
	AffectedResources []healthTypes.AffectedEntity
}

type Metrics

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

func NewMetrics

func NewMetrics(ctx context.Context, meter metric.Meter, c *cli.Context) (*Metrics, error)

func (*Metrics) EnrichEvents

func (m *Metrics) EnrichEvents(ctx context.Context, event healthTypes.Event) HealthEvent

func (*Metrics) EnrichOrgEvents

func (m *Metrics) EnrichOrgEvents(ctx context.Context, event healthTypes.OrganizationEvent) HealthEvent

func (*Metrics) GetAccountEvents added in v0.0.6

func (m *Metrics) GetAccountEvents() []HealthEvent

func (*Metrics) GetHealthEvents added in v0.0.6

func (m *Metrics) GetHealthEvents() []HealthEvent

func (*Metrics) GetOrgAccountsName added in v0.0.7

func (m *Metrics) GetOrgAccountsName(ctx context.Context)

func (*Metrics) GetOrgEvents

func (m *Metrics) GetOrgEvents() []HealthEvent

func (*Metrics) HealthOrganizationEnabled

func (m *Metrics) HealthOrganizationEnabled(ctx context.Context) bool

func (Metrics) LogEvent added in v0.1.0

func (m Metrics) LogEvent(e HealthEvent)

func (*Metrics) NewHealthClient added in v0.0.8

func (m *Metrics) NewHealthClient(ctx context.Context)

func (Metrics) SendSlackNotification

func (m Metrics) SendSlackNotification(e HealthEvent)

type Pricing

type Pricing struct {
	Product     Product
	ServiceCode string
	Terms       Terms
}

type Product

type Product struct {
	ProductFamily string
	Attributes    map[string]string
	Sku           string
}

type SKU

type SKU struct {
	PriceDimensions map[string]Details
	Sku             string
	EffectiveDate   string
	OfferTermCode   string
	TermAttributes  string
}

type Terms

type Terms struct {
	OnDemand map[string]SKU
	Reserved map[string]SKU
}

Jump to

Keyboard shortcuts

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