Documentation ¶
Index ¶
- func CheckLevel(flag, level string) bool
- func CreateDBManager(conf conf.DBConf) error
- func GetLevelFlag(level string) []byte
- func GetServiceAliasID(ServiceID string) string
- func GetTimeUnix(timeStr string) int64
- func MvLogFile(newName string, filePath string) error
- type ClusterMessage
- type ClusterMessageType
- type EventFilePlugin
- type EventLogMessage
- type Manager
- type MessageData
- type MessageDataList
- type MonitorData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetServiceAliasID ¶
GetServiceAliasID python: new_word = str(ord(string[10])) + string + str(ord(string[3])) + 'log' + str(ord(string[2]) / 7) new_id = hashlib.sha224(new_word).hexdigest()[0:16]
Types ¶
type ClusterMessage ¶
type ClusterMessage struct { Data []byte Mode ClusterMessageType }
type ClusterMessageType ¶
type ClusterMessageType string
const ( //EventMessage - operation log sharing EventMessage ClusterMessageType = "event_log" //ServiceMonitorMessage - business monitoring data message ServiceMonitorMessage ClusterMessageType = "monitor_message" //ServiceNewMonitorMessage - new business monitoring data message ServiceNewMonitorMessage ClusterMessageType = "new_monitor_message" //MonitorMessage - node monitoring data MonitorMessage ClusterMessageType = "monitor" )
type EventFilePlugin ¶
type EventFilePlugin struct {
HomePath string
}
EventFilePlugin
func (*EventFilePlugin) GetMessages ¶
func (m *EventFilePlugin) GetMessages(eventID, level string, length int) (interface{}, error)
GetMessages
func (*EventFilePlugin) SaveMessage ¶
func (m *EventFilePlugin) SaveMessage(events []*EventLogMessage) error
SaveMessage
type EventLogMessage ¶
type EventLogMessage struct { EventID string `json:"event_id"` Step string `json:"step"` Status string `json:"status"` Message string `json:"message"` Level string `json:"level"` Time string `json:"time"` Content []byte `json:"-"` //monitor message usage MonitorData []byte `json:"monitorData,omitempty"` }
EventLogMessage - event log entity
type Manager ¶
type MessageData ¶
type MessageData struct { Message string `json:"message"` Time string `json:"time"` Unixtime int64 `json:"utime"` }
MessageData message data - obtain the operation log of the specified operation
type MessageDataList ¶
type MessageDataList []MessageData
MessageDataList
func (MessageDataList) Len ¶
func (a MessageDataList) Len() int
func (MessageDataList) Less ¶
func (a MessageDataList) Less(i, j int) bool
func (MessageDataList) Swap ¶
func (a MessageDataList) Swap(i, j int)
type MonitorData ¶
Click to show internal directories.
Click to hide internal directories.