Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AlarmReason ¶
type AlarmReason uint
AlarmReason implements alarm reason.
const ( // GrowTooFast is the reason that memory increasing too fast. GrowTooFast AlarmReason = iota // ExceedAlarmRatio is the reason that memory used exceed threshold. ExceedAlarmRatio // NoReason means no alarm NoReason )
func (AlarmReason) String ¶
func (reason AlarmReason) String() string
type Handle ¶
type Handle struct {
// contains filtered or unexported fields
}
Handle is the handler for expensive query.
func NewMemoryUsageAlarmHandle ¶
func NewMemoryUsageAlarmHandle(exitCh chan struct{}) *Handle
NewMemoryUsageAlarmHandle builds a memory usage alarm handler.
func (*Handle) Run ¶
func (eqh *Handle) Run()
Run starts a memory usage alarm goroutine at the start time of the server.
func (*Handle) SetSessionManager ¶
func (eqh *Handle) SetSessionManager(sm util.SessionManager) *Handle
SetSessionManager sets the SessionManager which is used to fetching the info of all active sessions.
Click to show internal directories.
Click to hide internal directories.