Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type App ¶
type App struct {
// contains filtered or unexported fields
}
func NewAppWithClient ¶
func NewAppWithClient(redshiftClient GetUsageLimitAPIClient, slackClient PostMessageAPIClient, slackChannel string, opts ...AppOption) *App
func (*App) SendReport ¶
func (app *App) SendReport(ctx context.Context, message CloudWatchAlermMessage) error
type AppOption ¶
type AppOption func(*App)
func WithLogger ¶
func WithReportTemplate ¶
func WithRetryCount ¶
type CloudWatchAlermMessage ¶
type CloudWatchAlermMessage struct { AlarmName string `json:"AlarmName"` AlarmDescription *string `json:"AlarmDescription"` AWSAccountID string `json:"AWSAccountId"` AlarmConfigurationUpdatedTimestamp string `json:"AlarmConfigurationUpdatedTimestamp"` NewStateValue string `json:"NewStateValue"` NewStateReason string `json:"NewStateReason"` OldStateValue string `json:"OldStateValue"` StateChangeTime string `json:"StateChangeTime"` AWSRegion string `json:"Region"` AlarmArn string `json:"AlarmArn"` Trigger CloudWatchAlermMessageTrigger `json:"Trigger"` }
func (*CloudWatchAlermMessage) IsRedshiftServerlessLimitUsage ¶
func (m *CloudWatchAlermMessage) IsRedshiftServerlessLimitUsage() bool
func (*CloudWatchAlermMessage) UsageLimitID ¶
func (m *CloudWatchAlermMessage) UsageLimitID() string
func (*CloudWatchAlermMessage) WorkgroupName ¶
func (m *CloudWatchAlermMessage) WorkgroupName() string
type CloudWatchAlermMessageTrigger ¶
type CloudWatchAlermMessageTrigger struct { MetricName string `json:"MetricName"` Namespace string `json:"Namespace"` StatisticType string `json:"StatisticType"` Statistic string `json:"Statistic"` Unit any `json:"Unit"` Dimensions []CloudWatchAlermMessageTriggerDimension `json:"Dimensions"` Period int `json:"Period"` EvaluationPeriods int `json:"EvaluationPeriods"` ComparisonOperator string `json:"ComparisonOperator"` Threshold float64 `json:"Threshold"` TreatMissingData string `json:"TreatMissingData"` EvaluateLowSampleCountPercentile string `json:"EvaluateLowSampleCountPercentile"` }
type GetUsageLimitAPIClient ¶
type GetUsageLimitAPIClient interface {
GetUsageLimit(ctx context.Context, params *redshiftserverless.GetUsageLimitInput, optFns ...func(*redshiftserverless.Options)) (*redshiftserverless.GetUsageLimitOutput, error)
}
Click to show internal directories.
Click to hide internal directories.