mysql

package
v5.0.0-alpha5+incompat... Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 3, 2016 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package mysql is Metricbeat module for MySQL server.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateDSN

func CreateDSN(host, username, password string, timeout time.Duration) (string, error)

CreateDSN creates a DSN (data source name) string out of hostname, username, password, and timeout. It validates the resulting DSN and returns an error if the DSN is invalid.

func GetMySQLEnvDSN

func GetMySQLEnvDSN() string

GetMySQLEnvDSN returns the MySQL server DSN to use for testing. It reads the value from the MYSQL_DSN environment variable and returns root@tcp(127.0.0.1:3306)/ if it is not set.

func NewDB

func NewDB(dsn string) (*sql.DB, error)

NewDB returns a new mysql database handle. The dsn value (data source name) must be valid, otherwise an error will be returned.

Example DSN: [username[:password]@][protocol[(address)]]/

Types

This section is empty.

Directories

Path Synopsis
Package status fetches MySQL server status metrics.
Package status fetches MySQL server status metrics.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL