Documentation ¶
Index ¶
Constants ¶
const ( // Gauge metric type Gauge = iota // Derive metric type Derive // Counter metric type Counter )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MySQLStats ¶
type MySQLStats struct {
// contains filtered or unexported fields
}
MySQLStats implements statistics gathering from MySQL database.
func New ¶
func New(connectionString string) (*MySQLStats, error)
New constructs MySQLStats object, returns error when fails. connectionString is passed to sql.Open(), please refer to sql module documentation to learn about syntax.
func (*MySQLStats) GetInnodb ¶
func (mysql *MySQLStats) GetInnodb() (Stats, error)
GetInnodb queries database for innodb statistics. If query succeeded appriopriate collection of stats is returned, otherwise error is returned.
func (*MySQLStats) GetMasterStatus ¶
func (mysql *MySQLStats) GetMasterStatus() (Stats, error)
GetMasterStatus queries database for statistics related to it's master role. If query succeeded appriopriate collection of stats is returned, otherwise error is returned.
func (*MySQLStats) GetSlaveStatus ¶
func (mysql *MySQLStats) GetSlaveStatus() (Stats, error)
GetSlaveStatus queries database for statistics related to it's slave role. If query succeeded appropriate collection of stats is returned, otherwise error is returned.