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 某个应用性能分析数据
func CreateCacheMonitorMessageList ¶
func CreateCacheMonitorMessageList(eventID string) *CacheMonitorMessageList
CreateCacheMonitorMessageList 创建应用监控信息缓存器
func (*CacheMonitorMessageList) Insert ¶
func (c *CacheMonitorMessageList) Insert(mms ...MonitorMessage)
Insert 认为mms的hostname一致 每次收到消息进行gc
type EventBarrel ¶
type EventBarrel struct {
// contains filtered or unexported fields
}
EventBarrel 事件桶 不能在此结构上起协程
type Manager ¶
type Manager interface { ReceiveMessageChan() chan []byte SubMessageChan() chan [][]byte PubMessageChan() chan [][]byte DockerLogMessageChan() chan []byte 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 }
Manager 存储管理器
func NewManager ¶
NewManager 存储管理器
type MessageStore ¶
type MessageStore interface { InsertMessage(*db.EventLogMessage) InsertGarbageMessage(...*db.EventLogMessage) 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 //总时间 CumulativeTime float64 AverageTime float64 MaxTime float64 Count uint64 //异常请求次数 AbnormalCount uint64 }
MonitorMessage 性能监控消息系统模型
type MonitorMessageList ¶
type MonitorMessageList []MonitorMessage
MonitorMessageList 消息列表
func (*MonitorMessageList) Less ¶
func (m *MonitorMessageList) Less(i, j int) bool
Less 如果index为i的元素小于index为j的元素,则返回true,否则返回false
func (*MonitorMessageList) Pop ¶
func (m *MonitorMessageList) Pop(i int) *MonitorMessageList
Pop Pop
Click to show internal directories.
Click to hide internal directories.