cloudwatch

package
v0.0.1-test Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2022 License: AGPL-3.0 Imports: 40 Imported by: 105

Documentation

Index

Constants

View Source
const (
	MetricQueryTypeSearch metricQueryType = iota
	MetricQueryTypeQuery
)
View Source
const (
	MetricEditorModeBuilder metricEditorMode = iota
	MetricEditorModeRaw
)
View Source
const (
	GMDApiModeMetricStat gmdApiMode = iota
	GMDApiModeInferredSearchExpression
	GMDApiModeMathExpression
	GMDApiModeSQLExpression
)

Variables

View Source
var NewCWClient = func(sess *session.Session) cloudwatchiface.CloudWatchAPI {
	return cloudwatch.New(sess)
}

NewCWClient is a CloudWatch client factory.

Stubbable by tests.

View Source
var NewCWLogsClient = func(sess *session.Session) cloudwatchlogsiface.CloudWatchLogsAPI {
	return cloudwatchlogs.New(sess)
}

NewCWLogsClient is a CloudWatch logs client factory.

Stubbable by tests.

Functions

func NewInstanceSettings

func NewInstanceSettings(httpClientProvider httpclient.Provider) datasource.InstanceFactoryFunc

Types

type AWSError

type AWSError struct {
	Code    string
	Message string
	Payload map[string]string
}

func (*AWSError) Error

func (e *AWSError) Error() string

type ByTime

type ByTime data.Frame

ByTime implements sort.Interface for data.Frame based on the frame's time field

func (ByTime) Len

func (a ByTime) Len() int

func (ByTime) Less

func (a ByTime) Less(i, j int) bool

func (ByTime) Swap

func (a ByTime) Swap(i, j int)

type CloudWatchService

type CloudWatchService struct {
	Cfg      *setting.Cfg
	Executor *cloudWatchExecutor
}

func ProvideService

func ProvideService(cfg *setting.Cfg, httpClientProvider httpclient.Provider, features featuremgmt.FeatureToggles) *CloudWatchService

type DataQueryJson

type DataQueryJson struct {
	QueryType       string `json:"type,omitempty"`
	QueryMode       string
	PrefixMatching  bool
	Region          string
	Namespace       string
	MetricName      string
	Dimensions      map[string]interface{}
	Statistic       *string
	Period          string
	ActionPrefix    string
	AlarmNamePrefix string
}

type LogQueryJson

type LogQueryJson struct {
	LogType            string `json:"type"`
	SubType            string
	Limit              *int64
	Time               int64
	StartTime          *int64
	EndTime            *int64
	LogGroupName       string
	LogGroupNames      []string
	LogGroupNamePrefix string
	LogStreamName      string
	StartFromHead      bool
	Region             string
	QueryString        string
	QueryId            string
	StatsGroups        []string
	Subtype            string
	Expression         string
}

type QueryJson

type QueryJson struct {
	Datasource        map[string]string      `json:"datasource,omitempty"`
	Dimensions        map[string]interface{} `json:"dimensions,omitempty"`
	Expression        string                 `json:"expression,omitempty"`
	Id                string                 `json:"id,omitempty"`
	Label             *string                `json:"label,omitempty"`
	MatchExact        *bool                  `json:"matchExact,omitempty"`
	MaxDataPoints     int                    `json:"maxDataPoints,omitempty"`
	MetricEditorMode  *int                   `json:"metricEditorMode,omitempty"`
	MetricName        string                 `json:"metricName,omitempty"`
	MetricQueryType   metricQueryType        `json:"metricQueryType,omitempty"`
	Namespace         string                 `json:"namespace,omitempty"`
	Period            string                 `json:"period,omitempty"`
	RefId             string                 `json:"refId,omitempty"`
	Region            string                 `json:"region,omitempty"`
	SqlExpression     string                 `json:"sqlExpression,omitempty"`
	Statistic         *string                `json:"statistic,omitempty"`
	Statistics        []*string              `json:"statistics,omitempty"`
	TimezoneUTCOffset string                 `json:"timezoneUTCOffset,omitempty"`
	QueryType         string                 `json:"type,omitempty"`
	Hide              *bool                  `json:"hide,omitempty"`
	Alias             *string                `json:"alias,omitempty"`
}

type SessionCache

type SessionCache interface {
	GetSession(c awsds.SessionConfig) (*session.Session, error)
}

Jump to

Keyboard shortcuts

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