notification

package
v0.0.0-...-6eab0a8 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const ExceptionType = "exception"

Variables

This section is empty.

Functions

func CreateNotification

func CreateNotification(namespace, name, status, notificationMessage, zhNotificationMessage string)

func GetBackupMessage

func GetBackupMessage(notificationType, namespace, backupName, status, startTime, reason string) string

func GetNSOwner

func GetNSOwner(namespace string) (string, error)

func GetNotificationMessage

func GetNotificationMessage(notificationInfo Info) string

func GetPhoneNumberByNS

func GetPhoneNumberByNS(owner string) (string, error)

func GetQuotaMessage

func GetQuotaMessage(nsQuota *NameSpaceQuota) string

func InitFeishuClient

func InitFeishuClient()

func SendFeishuNotification

func SendFeishuNotification(notification Info, message, feishuWebHook string) error

func SendToSms

func SendToSms(namespace, databaseName, clusterName, content string) error

Types

type Info

type Info struct {
	DatabaseClusterName string
	Namespace           string
	Status              string
	DebtLevel           string
	Events              string
	Reason              string
	NotificationType    string
	DiskUsage           string
	CPUUsage            string
	MemUsage            string
	PerformanceType     string
	ExceptionType       string
}

type NameSpaceQuota

type NameSpaceQuota struct {
	NameSpace             string
	CPULimit              string
	MemLimit              string
	GPULimit              string
	EphemeralStorageLimit string
	ObjectStorageLimit    string
	NodePortLimit         string
	StorageLimit          string
	CPUUsage              string
	MemUsage              string
	GPUUsage              string
	EphemeralStorageUsage string
	ObjectStorageUsage    string
	NodePortUsage         string
	StorageUsage          string
}

Jump to

Keyboard shortcuts

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