Documentation ¶
Index ¶
- Constants
- Variables
- func GenerateNonSLAPromRules[T client.Object](alerts Alerts) func(ctx context.Context, obj T, svc *runtime.ServiceRuntime) *fnproto.Result
- type AlertBuilder
- func (a *AlertBuilder) AddAll() *AlertBuilder
- func (a *AlertBuilder) AddCustom(r []promV1.Rule) *AlertBuilder
- func (a *AlertBuilder) AddDisk() *AlertBuilder
- func (a *AlertBuilder) AddDiskFillingUp() *AlertBuilder
- func (a *AlertBuilder) AddMemory() *AlertBuilder
- func (a *AlertBuilder) GetAlerts() Alerts
- type Alerts
- type ServiceRule
Constants ¶
View Source
const ( SynTeam string = "schedar" SeverityCritical string = "critical" MinuteInterval, HourInterval, TwoHourInterval promV1.Duration = "1m", "1h", "2h" )
Variables ¶
View Source
var ( // AlertDefinitions is a map of alert definitions which has the name of alerts as key and the func ServiceRule as value AlertDefinitions = map[alert]ServiceRule{ // contains filtered or unexported fields } )
Functions ¶
Types ¶
type AlertBuilder ¶
type AlertBuilder struct {
// contains filtered or unexported fields
}
func NewAlertSetBuilder ¶
func NewAlertSetBuilder(containerName, namespace string) *AlertBuilder
func (*AlertBuilder) AddAll ¶
func (a *AlertBuilder) AddAll() *AlertBuilder
func (*AlertBuilder) AddCustom ¶
func (a *AlertBuilder) AddCustom(r []promV1.Rule) *AlertBuilder
func (*AlertBuilder) AddDisk ¶
func (a *AlertBuilder) AddDisk() *AlertBuilder
func (*AlertBuilder) AddDiskFillingUp ¶
func (a *AlertBuilder) AddDiskFillingUp() *AlertBuilder
func (*AlertBuilder) AddMemory ¶
func (a *AlertBuilder) AddMemory() *AlertBuilder
func (*AlertBuilder) GetAlerts ¶
func (a *AlertBuilder) GetAlerts() Alerts
type Alerts ¶
type Alerts struct {
// contains filtered or unexported fields
}
Alerts the object that the service must create to generate non sla prometheus rules
type ServiceRule ¶
ServiceRule is a func definition to get a specific rule based on a container name s
Click to show internal directories.
Click to hide internal directories.