Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CacheMonitorMessageList ¶
type CacheMonitorMessageList struct { UpdateTime time.Time // contains filtered or unexported fields }
CacheMonitorMessageList - An application performance analysis data
func CreateCacheMonitorMessageList ¶
func CreateCacheMonitorMessageList(eventID string) *CacheMonitorMessageList
CreateCacheMonitorMessageList - Create application monitoring information buffer
func (*CacheMonitorMessageList) Insert ¶
func (c *CacheMonitorMessageList) Insert(mms ...MonitorMessage)
Insert - Think that the hostname of mms is consistent Gc every time a message is received
type EventBarrel ¶
type EventBarrel struct {
// contains filtered or unexported fields
}
EventBarrel Coroutine cannot be started on this structure
type Manager ¶
type Manager interface { ReceiveMessageChan() chan []byte SubMessageChan() chan [][]byte PubMessageChan() chan [][]byte DockerLogMessageChan() chan []byte GetDockerLogs(serviceID string, length int) []string MonitorMessageChan() chan [][]byte WebSocketMessageChan(mode, eventID, subID string) chan *db.EventLogMessage NewMonitorMessageChan() chan []byte RealseWebSocketMessageChan(mode, EventID, subID string) Run() error Stop() Monitor() []db.MonitorData Scrape(ch chan<- prometheus.Metric, namespace, exporter, from string) error Error() chan error HealthCheck() map[string]string }
Storage manager
func NewManager ¶
NewManager
type MessageStore ¶
type MessageStore interface { InsertMessage(*db.EventLogMessage) InsertGarbageMessage(...*db.EventLogMessage) GetHistoryMessage(eventID string, length int) []string SubChan(eventID, subID string) chan *db.EventLogMessage RealseSubChan(eventID, subID string) GetMonitorData() *db.MonitorData Run() Gc() Scrape(ch chan<- prometheus.Metric, namespace, exporter, from string) error // contains filtered or unexported methods }
MessageStore store
type MonitorMessage ¶
type MonitorMessage struct { ServiceID string Port string HostName string MessageType string //mysql,http ... Key string //total time CumulativeTime float64 AverageTime float64 MaxTime float64 Count uint64 //Number of abnormal requests AbnormalCount uint64 }
MonitorMessage - performance monitoring message system model
type MonitorMessageList ¶
type MonitorMessageList []MonitorMessage
MonitorMessageList
func (*MonitorMessageList) Len ¶
func (m *MonitorMessageList) Len() int
Len - Is the total number of elements in the collection
func (*MonitorMessageList) Less ¶
func (m *MonitorMessageList) Less(i, j int) bool
Less - If the element with index i is smaller than the element with index j, return true, otherwise return false
func (*MonitorMessageList) Swap ¶
func (m *MonitorMessageList) Swap(i, j int)
Swap - Swap elements with index i and j
Click to show internal directories.
Click to hide internal directories.