presets

package
v0.0.0-...-563862d Latest Latest
Warning

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

Go to latest
Published: May 24, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Presets = make(map[string]PresetInterface)
)

Functions

This section is empty.

Types

type ALB

type ALB struct {
	Preset
}

func (*ALB) Ready

func (p *ALB) Ready() error

Ready overwrites the Preset Ready function to enforce specific behavior

type CLB

type CLB struct {
	Preset
}

func (*CLB) Ready

func (p *CLB) Ready() error

Overwrite the Preset Ready function to enforce specific behavior

type CloudFront

type CloudFront struct {
	Preset
}

func (*CloudFront) Ready

func (p *CloudFront) Ready() error

Ready overwrites the Preset Ready function to enforce specific behavior

type EC2

type EC2 struct {
	Preset
}

func (*EC2) Ready

func (p *EC2) Ready() error

Overwrite the Preset Ready function to enforce specific behavior

type MeasurementConfig

type MeasurementConfig struct {
	MetricName string       `json:"metric"`
	Config     []StatConfig `json:"config"`
}

type MeasurementJSON

type MeasurementJSON struct {
	Namespace        string              `json:"namespace"`
	PeriodMinutes    int                 `json:"period-minutes,omitempty"`
	Region           string              `json:"region,omitempty"`
	MetricFilter     string              `json:"metric-filter,omitempty"`
	DimensionFilters []string            `json:"dimension-filters,omitempty"`
	Measurements     []MeasurementConfig `json:"measurements,omitempty"`
}

type None

type None struct {
	Preset
	Stats []string
}

func (*None) AddMetrics

func (p *None) AddMetrics(metrics []types.Metric) error

func (*None) AddStats

func (p *None) AddStats(stats []string)

func (*None) BuildMeasurementString

func (p *None) BuildMeasurementString() error

func (*None) BuildMetricDataQueries

func (p *None) BuildMetricDataQueries(period int32) ([]types.MetricDataQuery, error)

func (*None) GetMeasurementString

func (p *None) GetMeasurementString(pretty bool) (string, error)

func (*None) GetMetricFilter

func (p *None) GetMetricFilter() string

func (*None) SetMetricFilter

func (p *None) SetMetricFilter(name string) error

type Preset

type Preset struct {
	Metrics          []types.Metric
	DimensionFilters []types.DimensionFilter
	Namespace        string
	MetricFilter     string
	Region           string
	PeriodMinutes    int
	Description      string
	Name             string
	// contains filtered or unexported fields
}

func (*Preset) AddDimensionFilters

func (p *Preset) AddDimensionFilters(filters []types.DimensionFilter) error

func (*Preset) AddMetrics

func (p *Preset) AddMetrics(metrics []types.Metric) error

func (*Preset) BuildMeasurementConfig

func (p *Preset) BuildMeasurementConfig() error

func (*Preset) BuildMetricDataQueries

func (p *Preset) BuildMetricDataQueries(period int32) ([]types.MetricDataQuery, error)

func (*Preset) GetDescription

func (p *Preset) GetDescription() string

func (*Preset) GetDimensionFilters

func (p *Preset) GetDimensionFilters() []types.DimensionFilter

func (*Preset) GetMeasurementString

func (p *Preset) GetMeasurementString(pretty bool) (string, error)

func (*Preset) GetMetricFilter

func (p *Preset) GetMetricFilter() string

func (*Preset) GetNamespace

func (p *Preset) GetNamespace() string

func (*Preset) GetPeriodMinutes

func (p *Preset) GetPeriodMinutes() int

func (*Preset) GetRegion

func (p *Preset) GetRegion() string

func (*Preset) Ready

func (p *Preset) Ready() error

overwrite the Ready function when building a new preset to enforce specific behavior

func (*Preset) SetErrorOnMissing

func (p *Preset) SetErrorOnMissing(flag bool) error

func (*Preset) SetMeasurementString

func (p *Preset) SetMeasurementString(config string) error

func (*Preset) SetMetricFilter

func (p *Preset) SetMetricFilter(name string) error

func (*Preset) SetPeriodMinutes

func (p *Preset) SetPeriodMinutes(period int) error

func (*Preset) SetRegion

func (p *Preset) SetRegion(region string) error

func (*Preset) SetVerbose

func (p *Preset) SetVerbose(flag bool) error

type PresetInterface

type PresetInterface interface {
	BuildMetricDataQueries(period int32) ([]types.MetricDataQuery, error)
	AddMetrics(metrics []types.Metric) error
	GetDescription() string
	GetNamespace() string
	GetMetricFilter() string
	SetMetricFilter(name string) error
	GetPeriodMinutes() int
	SetPeriodMinutes(period int) error
	GetRegion() string
	SetRegion(region string) error
	SetVerbose(flag bool) error
	SetErrorOnMissing(flag bool) error
	SetMeasurementString(config string) error
	BuildMeasurementConfig() error
	GetMeasurementString(pretty bool) (string, error)
	GetDimensionFilters() []types.DimensionFilter
	AddDimensionFilters(filters []types.DimensionFilter) error
	Ready() error
}

type StatConfig

type StatConfig struct {
	Stat        string `json:"stat"`
	Measurement string `json:"measurement"`
}

Jump to

Keyboard shortcuts

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