Documentation
¶
Index ¶
- func GetAlertBody(message, ServicePath string, labels *model.Sample) ([]byte, error)
- func NewPromClient(ThanosQueryURL string) (promapi.API, error)
- func Query(promClient promapi.API, promql string) (model.Vector, error)
- func SendMessage(body []byte, url string) error
- func SeriesToMany(threshold int) string
- type MessageBody
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetAlertBody ¶
func SendMessage ¶
func SeriesToMany ¶
Types ¶
type MessageBody ¶
type MessageBody struct {
ApplicationName string `json:"applicationName"`
Env string `json:"env"`
ScheduleTime string `json:"scheduleTime"`
ExpireTime string `json:"expireTime"`
SendAlias string `json:"sendAlias"`
ContextType string `json:"contextType"`
Content string `json:"content"`
Tos []string `json:"tos"`
TosType int32 `json:"tosType"`
ToParties []string `json:"toParties"`
}
func (*MessageBody) BuildMessageBody ¶
func (msg *MessageBody) BuildMessageBody(content string, tos, toParties []string) error
Click to show internal directories.
Click to hide internal directories.