コード例 #1
0
ファイル: server.go プロジェクト: haikulearning/mysql_probe
func StartStatuServer(reportdir string, port int, log_path string) *StatuServer {

	jsonlog := jsonlog.Init(log_path)
	defer jsonlog.LogFile().Close()

	s := StatuServer{reportdir: reportdir, port: port, jsonlog: jsonlog}

	s.Start()

	return &s
}
コード例 #2
0
func RunMysqlTest(name string, host string, port int, user string, pass string, interval int, timeout int, reportdir string, log_path string) *MysqlTest {

	jsonlog := jsonlog.Init(log_path)
	defer jsonlog.LogFile().Close()

	m := MysqlTest{Name: name, host: host, port: port, user: user, pass: pass, interval: interval, timeout: timeout, reportdir: reportdir, jsonlog: jsonlog, iteration: 1}

	m.Run()

	return &m
}