modelRT/constants/monitor.go

47 lines
1.5 KiB
Go
Raw Normal View History

2025-11-03 17:35:03 +08:00
// Package constants define constant variable
package constants
const (
// MonitorStartAction define the real time monitor start action
MonitorStartAction string = "start"
// MonitorStopAction define the real time monitor stop action
MonitorStopAction string = "stop"
// MonitorAppendAction define the real time monitor append action
MonitorAppendAction string = "append"
)
// 定义状态常量
const (
// SubSuccessCode define subscription success code
SubSuccessCode = "1001"
// SubSuccessCode define subscription failed code
SubFailedCode = "1002"
// CancelSubSuccessCode define cancel subscription success code
CancelSubSuccessCode = "1005"
// CancelSubFailedCode define cancel subscription failed code
CancelSubFailedCode = "1006"
)
const (
// SubSuccessMsg define subscription success message
SubSuccessMsg = "subscription success"
// SubFailedMsg define subscription failed message
SubFailedMsg = "subscription failed"
2025-11-10 17:32:18 +08:00
// CancelSubSuccessMsg define cancel subscription success message
CancelSubSuccessMsg = "cancel subscription success"
2025-11-10 17:32:18 +08:00
// CancelSubFailedMsg define cancel subscription failed message
CancelSubFailedMsg = "Cancel subscription failed"
)
2025-11-10 17:32:18 +08:00
// TargetOperationType define constant to the target operation type
type TargetOperationType int
const (
// OpAppend define append new target to the monitoring list
OpAppend TargetOperationType = iota
// OpRemove define remove exist target from the monitoring list
OpRemove
// OpUpdate define update exist target from the monitoring list
OpUpdate
)