service

package
v0.0.0-...-94e4715 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FsSend

func FsSend(ctx context.Context, hook string, body jsonutils.JSONObject) error

func StartService

func StartService()

Types

type FeishuNotifier

type FeishuNotifier struct {
	Client  *feishu.Tenant
	ChatIds []string
}

func NewFeishuNotifier

func NewFeishuNotifier(appId, appSecret string) (*FeishuNotifier, error)

func (*FeishuNotifier) Send

type PrometheusAlert

type PrometheusAlert struct {
	Status       string            `json:"status"`
	Labels       map[string]string `json:"labels"`
	Annotations  map[string]string `json:"annotations"`
	StartsAt     string            `json:"startsAt"`
	EndsAt       string            `json:"endsAt"`
	GeneratorURL string            `json:"generatorURL"`
}

type PrometheusRequest

type PrometheusRequest struct {
	Status      string            `json:"status"`
	ExternalURL string            `json:"externalURL"`
	Alerts      []PrometheusAlert `json:"alert"`
}

type SOptions

type SOptions struct {
	options.BaseOptions

	AppId     string
	AppSecret string
	Hook      string
}
var (
	Options SOptions
)

Jump to

Keyboard shortcuts

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