Documentation ¶
Index ¶
- func GetProcessListLabels() []string
- type MySQLMonitor
- func (m *MySQLMonitor) Connect(ctx context.Context) (err error)
- func (m *MySQLMonitor) GetProcessColumnCount() (int, error)
- func (m *MySQLMonitor) Kill(pid int) error
- func (m *MySQLMonitor) ShowGlobalStatus(ctx context.Context) error
- func (m *MySQLMonitor) ShowProcessList(ctx context.Context) (ProcessList, error)
- func (m *MySQLMonitor) SortColumn() int
- func (m *MySQLMonitor) ToggleSortColumn()
- type Options
- type Process
- type ProcessList
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetProcessListLabels ¶
func GetProcessListLabels() []string
Types ¶
type MySQLMonitor ¶
type MySQLMonitor struct { QueryFilter string UserFilter string TimeFilter string ProcessList ProcessList // contains filtered or unexported fields }
func NewMySQLMonitor ¶
func NewMySQLMonitor(o *Options) *MySQLMonitor
func (*MySQLMonitor) GetProcessColumnCount ¶
func (m *MySQLMonitor) GetProcessColumnCount() (int, error)
func (*MySQLMonitor) Kill ¶
func (m *MySQLMonitor) Kill(pid int) error
func (*MySQLMonitor) ShowGlobalStatus ¶
func (m *MySQLMonitor) ShowGlobalStatus(ctx context.Context) error
func (*MySQLMonitor) ShowProcessList ¶
func (m *MySQLMonitor) ShowProcessList(ctx context.Context) (ProcessList, error)
func (*MySQLMonitor) SortColumn ¶
func (m *MySQLMonitor) SortColumn() int
func (*MySQLMonitor) ToggleSortColumn ¶
func (m *MySQLMonitor) ToggleSortColumn()
type Options ¶
type Options struct { // mysql, but we could support postgres... sometime Driver string // connection credentials Hostname string Username string Password string Database string Port string // polling interval Delay int // skip idle connections SkipIdle bool }
func NewOptions ¶
func NewOptions() *Options
type Process ¶
type Process struct { Id uint64 `db:"ID"` Host string `db:"HOST"` User string `db:"USER"` Db sql.NullString `db:"DB"` Command string `db:"COMMAND"` Time int `db:"TIME"` TimeMS uint64 `db:"TIME_MS"` State sql.NullString `db:"STATE"` Info sql.NullString `db:"INFO"` RowsRead uint64 `db:"ROWS_READ"` RowsSent uint64 `db:"ROWS_SENT"` RowsExamined uint64 `db:"ROWS_EXAMINED"` }
func (*Process) GetValueByLabel ¶
type ProcessList ¶
type ProcessList []Process
Click to show internal directories.
Click to hide internal directories.