Documentation ¶
Index ¶
- func AddAgent(database *sql.DB, agentId string, path string) error
- func AgentIDExists(database *sql.DB, agentId string) bool
- func CreateDB(dbName string) (*sql.DB, error)
- func GetAgents(database *sql.DB) []string
- func GetClientKey(clientId string) string
- func GetCustomMetricNames(database *sql.DB) []string
- func GetDBPathForAgent(database *sql.DB, agentId string) string
- func GetLogFromDB(database *sql.DB, logType string, from int64, to int64, time int64) []string
- func GetLogFromDBCount(database *sql.DB, logType string, count int64) []string
- func OpenDB(db *sql.DB, path string) (*sql.DB, error)
- func RemoveAgent(database *sql.DB, agentId string) error
- func SaveLogToDB(database *sql.DB, unixTime string, jsonStr string, logType string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AgentIDExists ¶
AgenIDExists checks if agent is added to the db
func GetClientKey ¶
func GetCustomMetricNames ¶
func GetDBPathForAgent ¶
GetDBPathForAgent returns the db path of the given agent
func GetLogFromDB ¶
GetLogFromDB returns log records of the given log type in the given time/range
func GetLogFromDBCount ¶
GetLogFromDBCount returns log records of the given log type
func RemoveAgent ¶
RemoveAgent removes agent info
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.