Versions in this module Expand all Collapse all v1 v1.0.0 Apr 17, 2016 Changes in this version + var ClientConnectChan = make(chan *client, 1) + var ClientConnectChanWss = make(chan *clientWss, 1) + var ClientDisconnectChan = make(chan *client) + var ClientDisconnectChanWss = make(chan *clientWss) + var ClientRmChan = make(chan *client, 5) + var ClientRmChanWss = make(chan *clientWss, 5) + var Clients = make(map[*client]*client) + var ClientsWss = make(map[*clientWss]*clientWss) + var RecvChan chan interface + var RecvChanWss chan interface + var SendChan chan interface + var SendChanWss chan interface + func DisconnectClient(c *client) + func DisconnectClientWss(c *clientWss) + func PingAPI(hostname string) (bool, *http.Response) + type API struct + GetCode []int + GetData [][]byte + GetError []error + GetResp []APIResponse + PutResp []APIResponse + func NewAPI(origin, hostname, agentUuid string, links map[string]string) *API + func (a *API) AgentLink(resource string) string + func (a *API) AgentUuid() string + func (a *API) Connect(hostname, agentUuid string) error + func (a *API) CreateInstance(url string, it interface{}) (bool, error) + func (a *API) EntryLink(resource string) string + func (a *API) Get(url string) (int, []byte, error) + func (a *API) Hostname() string + func (a *API) Init(hostname string, headers map[string]string) (code int, err error) + func (a *API) Origin() string + func (a *API) Post(url string, data []byte) (*http.Response, []byte, error) + func (a *API) Put(url string, data []byte) (*http.Response, []byte, error) + func (a *API) URL(paths ...string) string + type APIResponse struct + Code int + Data []byte + Error error + type AnalyzerArgs struct + Config pc.QAN + MysqlConn mysql.Connector + Name string + RestartChan chan proto.Instance + TickChan chan time.Time + type Clock struct + Added []uint + Eta float64 + Removed []chan time.Time + func NewClock() *Clock + func (m *Clock) Add(c chan time.Time, t uint, sync bool) + func (m *Clock) ETA(c chan time.Time) float64 + func (m *Clock) Remove(c chan time.Time) + type CmdFactory struct + Cmds []*MockCmd + func (f *CmdFactory) Make(name string, args ...string) cmd.Cmd + type ConnectionFactory struct + Conn mysql.Connector + func (f *ConnectionFactory) Make(dsn string) mysql.Connector + type DataClient struct + ConnectError error + ErrChan chan error + RecvError chan error + TraceChan chan string + func NewDataClient(dataChan chan []byte, respChan chan interface{}) *DataClient + func (c *DataClient) Conn() *websocket.Conn + func (c *DataClient) Connect() + func (c *DataClient) ConnectChan() chan bool + func (c *DataClient) ConnectOnce(timeout uint) error + func (c *DataClient) Disconnect() error + func (c *DataClient) DisconnectOnce() error + func (c *DataClient) ErrorChan() chan error + func (c *DataClient) Recv(resp interface{}, timeout uint) error + func (c *DataClient) RecvChan() chan *proto.Cmd + func (c *DataClient) Send(data interface{}, timeout uint) error + func (c *DataClient) SendBytes(data []byte, timeout uint) error + func (c *DataClient) SendChan() chan *proto.Reply + func (c *DataClient) SetConnectChan(connectChan chan bool) + func (c *DataClient) Start() + func (c *DataClient) Status() map[string]string + func (c *DataClient) Stop() + type IntervalIterFactory struct + Iters []qan.IntervalIter + TickChans map[qan.IntervalIter]chan time.Time + func (tf *IntervalIterFactory) Make(collectFrom string, filename slowlog.FilenameFunc, tickChan chan time.Time) qan.IntervalIter + func (tf *IntervalIterFactory) Reset() + type Iter struct + func NewIter(intervalChan chan *qan.Interval) *Iter + func (i *Iter) Calls() []string + func (i *Iter) IntervalChan() chan *qan.Interval + func (i *Iter) Reset() + func (i *Iter) Start() + func (i *Iter) Stop() + func (i *Iter) TickChan() chan time.Time + type LogParser struct + func NewLogParser() *LogParser + func (p *LogParser) EventChan() <-chan *log.Event + func (p *LogParser) Send(e *log.Event) + func (p *LogParser) Start() error + func (p *LogParser) Stop() + type MockCmd struct + Args []string + Name string + RunErr error + RunOutput string + func NewMockCmd(name string, args ...string) *MockCmd + func (c *MockCmd) Run() (output string, err error) + type MockServiceManager struct + Cmds []*proto.Cmd + IsRunningVal bool + StartErr error + StopErr error + func NewMockServiceManager(name string, readyChan chan bool, traceChan chan string) *MockServiceManager + func (m *MockServiceManager) GetConfig() ([]proto.AgentConfig, []error) + func (m *MockServiceManager) Handle(cmd *proto.Cmd) *proto.Reply + func (m *MockServiceManager) IsRunning() bool + func (m *MockServiceManager) Reset() + func (m *MockServiceManager) Start() error + func (m *MockServiceManager) Status() map[string]string + func (m *MockServiceManager) Stop() error + type MrmsMonitor struct + func NewMrmsMonitor() *MrmsMonitor + func (m *MrmsMonitor) Add(in proto.Instance) chan proto.Instance + func (m *MrmsMonitor) Check() + func (m *MrmsMonitor) ListenerCount(uuid string) uint + func (m *MrmsMonitor) Remove(uuid string, c chan proto.Instance) + func (m *MrmsMonitor) SimulateMySQLRestart() + func (m *MrmsMonitor) Start(interval time.Duration) error + func (m *MrmsMonitor) Status() (status map[string]string) + func (m *MrmsMonitor) Stop() error + type NullClient struct + func NewNullClient() *NullClient + func (c *NullClient) Conn() *websocket.Conn + func (c *NullClient) Connect() + func (c *NullClient) ConnectChan() chan bool + func (c *NullClient) ConnectOnce() error + func (c *NullClient) Disconnect() error + func (c *NullClient) ErrorChan() chan error + func (c *NullClient) Recv(data interface{}, timeout uint) error + func (c *NullClient) RecvChan() chan *proto.Cmd + func (c *NullClient) Send(data interface{}, timeout uint) error + func (c *NullClient) SendBytes(data []byte, timeout uint) error + func (c *NullClient) SendChan() chan *proto.Reply + func (c *NullClient) Start() + func (c *NullClient) Stop() + type NullMySQL struct + CurrentTzOffsetHours int + SetChan chan bool + SystemTzOffsetHours int + Version string + func NewNullMySQL() *NullMySQL + func (n *NullMySQL) AtLeastVersion(v string) (bool, error) + func (n *NullMySQL) Close() + func (n *NullMySQL) Connect() error + func (n *NullMySQL) DB() *sql.DB + func (n *NullMySQL) DSN() string + func (n *NullMySQL) Exec(queries []string) error + func (n *NullMySQL) Explain(query string, db string) (explain *proto.ExplainResult, err error) + func (n *NullMySQL) GetExec() []string + func (n *NullMySQL) GetGlobalVarNumber(varName string) float64 + func (n *NullMySQL) GetGlobalVarString(varName string) string + func (n *NullMySQL) GetSet() []mysql.Query + func (n *NullMySQL) GetUptimeCount() uint + func (n *NullMySQL) Reset() + func (n *NullMySQL) Set(queries []mysql.Query) error + func (n *NullMySQL) SetAtLeastVersion(atLeastVersion bool, err error) + func (n *NullMySQL) SetExplain(query string, explain *proto.ExplainResult) + func (n *NullMySQL) SetGlobalVarNumber(name string, value float64) + func (n *NullMySQL) SetGlobalVarString(name, value string) + func (n *NullMySQL) SetUptime(uptime int64) + func (n *NullMySQL) UTCOffset() (time.Duration, time.Duration, error) + func (n *NullMySQL) Uptime() (int64, error) + type QanAnalyzer struct + CrashChan chan bool + ErrorChan chan error + StartChan chan bool + StopChan chan bool + func NewQanAnalyzer(name string) *QanAnalyzer + func (a *QanAnalyzer) Config() pc.QAN + func (a *QanAnalyzer) SetConfig(config pc.QAN) + func (a *QanAnalyzer) Start() error + func (a *QanAnalyzer) Status() map[string]string + func (a *QanAnalyzer) Stop() error + func (a *QanAnalyzer) String() string + type QanAnalyzerFactory struct + Args []AnalyzerArgs + func NewQanAnalyzerFactory(a ...qan.Analyzer) *QanAnalyzerFactory + func (f *QanAnalyzerFactory) Make(config pc.QAN, name string, mysqlConn mysql.Connector, ...) qan.Analyzer + type QanWorker struct + CleanupChan chan bool + CleanupCrashChan chan bool + ErrorChan chan error + Interval *qan.Interval + Result *qan.Result + RunChan chan bool + RunCrashChan chan bool + SetupChan chan bool + SetupCrashChan chan bool + StopChan chan bool + func NewQanWorker() *QanWorker + func (w *QanWorker) Cleanup() error + func (w *QanWorker) Run() (*qan.Result, error) + func (w *QanWorker) SetConfig(config pc.QAN) + func (w *QanWorker) Setup(interval *qan.Interval) error + func (w *QanWorker) Status() map[string]string + func (w *QanWorker) Stop() error + type SlowMySQL struct + func NewSlowMySQL(dsn string) *SlowMySQL + func (s *SlowMySQL) AtLeastVersion(v string) (bool, error) + func (s *SlowMySQL) Close() + func (s *SlowMySQL) Connect() error + func (s *SlowMySQL) DB() *sql.DB + func (s *SlowMySQL) DSN() string + func (s *SlowMySQL) GetGlobalVarNumber(varName string) float64 + func (s *SlowMySQL) GetGlobalVarString(varName string) string + func (s *SlowMySQL) Set(queries []mysql.Query) error + func (s *SlowMySQL) SetGlobalDelay(delay time.Duration) + func (s *SlowMySQL) Uptime() (int64, error) + type Spooler struct + DataIn []interface{} + DataOut map[string][]byte + FilesOut []string + RejectedFiles []string + func NewSpooler(dataChan chan interface{}) *Spooler + func (s *Spooler) CancelFiles() + func (s *Spooler) Files() <-chan string + func (s *Spooler) Read(file string) ([]byte, error) + func (s *Spooler) Reject(file string) error + func (s *Spooler) Remove(file string) error + func (s *Spooler) Reset() + func (s *Spooler) Start(sz proto.Serializer) error + func (s *Spooler) Status() map[string]string + func (s *Spooler) Stop() error + func (s *Spooler) Write(service string, data interface{}) error + type Ticker struct + Added []chan time.Time + RunningChan chan bool + func NewTicker(syncChan chan bool) *Ticker + func (t *Ticker) Add(c chan time.Time) + func (t *Ticker) ETA(now int64) float64 + func (t *Ticker) Remove(c chan time.Time) + func (t *Ticker) Run(now int64) + func (t *Ticker) Stop() + type TickerFactory struct + Made []uint + func NewTickerFactory() *TickerFactory + func (tf *TickerFactory) Make(atInterval uint, sync bool) ticker.Ticker + func (tf *TickerFactory) Set(tickers []ticker.Ticker) + type WebsocketClient struct + ConnectError error + ErrChan chan error + RecvBytes chan []byte + RecvError chan error + SendError chan error + TraceChan chan string + func NewWebsocketClient(sendChan chan *proto.Cmd, recvChan chan *proto.Reply, ...) *WebsocketClient + func (c *WebsocketClient) Conn() *websocket.Conn + func (c *WebsocketClient) Connect() + func (c *WebsocketClient) ConnectChan() chan bool + func (c *WebsocketClient) ConnectOnce(timeout uint) error + func (c *WebsocketClient) Disconnect() error + func (c *WebsocketClient) DisconnectOnce() error + func (c *WebsocketClient) ErrorChan() chan error + func (c *WebsocketClient) Recv(data interface{}, timeout uint) error + func (c *WebsocketClient) RecvChan() chan *proto.Cmd + func (c *WebsocketClient) Send(data interface{}, timeout uint) error + func (c *WebsocketClient) SendBytes(data []byte, timeout uint) error + func (c *WebsocketClient) SendChan() chan *proto.Reply + func (c *WebsocketClient) SetConnectChan(connectChan chan bool) + func (c *WebsocketClient) Start() + func (c *WebsocketClient) Status() map[string]string + func (c *WebsocketClient) Stop() + type WebsocketServer struct + func (s *WebsocketServer) Run(addr string, endpoint string) + type WebsocketServerWss struct + func (s *WebsocketServerWss) RunWss(addr string, endpoint string)