apis

package
v1.3.0-rc Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2021 License: Apache-2.0 Imports: 32 Imported by: 0

Documentation

Index

Constants

View Source
const MicroService = "micro_service"

Variables

This section is empty.

Functions

This section is empty.

Types

type MicroAlertAPI

type MicroAlertAPI interface {
	GetMicroServiceFilterTags() map[string]bool

	// micro alert apis
	QueryAlertRule(r *http.Request, scope, scopeId string) (*pb.AlertTypeRuleResp, error)
	QueryAlert(r *http.Request, scope, scopeId string, pageNum, pageSize uint64) ([]*pb.Alert, error)
	GetAlert(lang i18n.LanguageCodes, id uint64) (*pb.Alert, error)
	CountAlert(scope, scopeID string) (int, error)
	GetAlertDetail(r *http.Request, id uint64) (*pb.Alert, error)
	CheckAlert(alert *pb.Alert) interface{}
	CreateAlert(alert *pb.Alert) (alertID uint64, err error)
	UpdateAlert(alertID uint64, alert *pb.Alert) (err error)
	UpdateAlertEnable(id uint64, enable bool) (err error)
	DeleteAlert(id uint64) (err error)

	// micro custom alert apis
	CustomizeMetrics(lang i18n.LanguageCodes, scope, scopeID string, names []string) (*pb.CustomizeMetrics, error)
	NotifyTargetsKeys(lang i18n.LanguageCodes, orgId string) []*pb.DisplayKey
	CustomizeAlerts(lang i18n.LanguageCodes, scope, scopeID string, pageNo, pageSize int) ([]*pb.CustomizeAlertOverview, int, error)
	CustomizeAlert(id uint64) (*pb.CustomizeAlertDetail, error)
	CustomizeAlertDetail(id uint64) (*pb.CustomizeAlertDetail, error)
	CheckCustomizeAlert(alert *pb.CustomizeAlertDetail) error
	CreateCustomizeAlert(alertDetail *pb.CustomizeAlertDetail) (alertID uint64, err error)
	UpdateCustomizeAlert(alertDetail *pb.CustomizeAlertDetail) (err error)
	UpdateCustomizeAlertEnable(id uint64, enable bool) (err error)
	DeleteCustomizeAlert(id uint64) (err error)

	//micro custom alert records
	GetAlertRecordAttr(lang i18n.LanguageCodes, scope string) (*pb.AlertRecordAttr, error)
	QueryAlertRecord(lang i18n.LanguageCodes, scope, scopeId string, alertGroup, alertState, alertType,
		handleState, handlerId []string, pageNo, pageSize int64) ([]*pb.AlertRecord, error)
	CountAlertRecord(scope, scopeId string, alertGroups, alertStates, alertTypes, handleStates, handlerIDs []string) (int, error)
	GetAlertRecord(lang i18n.LanguageCodes, groupId string) (*pb.AlertRecord, error)
	QueryAlertHistory(lang i18n.LanguageCodes, groupId string, start, end int64, limit uint) ([]*pb.AlertHistory, error)
	CreateAlertRecordIssue(groupId string, issueCreate *apistructs.IssueCreateRequest) (uint64, error)
	UpdateAlertRecordIssue(groupId string, issueId uint64, request *apistructs.IssueUpdateRequest) error
	DashboardPreview(alert *pb.CustomizeAlertDetail) (res *block.View, err error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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