Documentation ¶
Index ¶
- Constants
- Variables
- func AcquireLock(schedule *model.Schedule, startTime time.Time) (*model.OwlScheduleLog, error)
- func BuildCacheOfPingList(agentID int32, checkedTime time.Time) *model.PingListLog
- func DiagnoseRdb(dsn string, db *sql.DB) *apiModel.Rdb
- func FalconAgentHeartbeat(agents []*cModel.FalconAgentHeartbeat, updateOnly bool) *cModel.FalconAgentHeartbeatResult
- func FreeLock(scheduleLog *model.OwlScheduleLog, endStatus model.TaskStatus, endMsg string, ...)
- func GetAgentConfig(key string) *model.AgentConfigResult
- func GetPingListFromCache(agentID int32, checkedTime time.Time) ([]*nqmModel.HeartbeatTarget, *model.PingListLog)
- func GetScheduleLog(uuid uuid.UUID) *model.OwlScheduleLog
- func InitBossRdb(dbConfig *commonDb.DbConfig)
- func InitGraphRdb(dbConfig *commonDb.DbConfig)
- func InitPortalRdb(dbConfig *commonDb.DbConfig)
- func InsertNqmAgentByHeartbeat(r *nqmModel.HeartbeatRequest) *nqmModel.Agent
- func ListHostgroups(paging commonModel.Paging) ([]*model.HostgroupsResult, *commonModel.Paging)
- func ListHosts(paging commonModel.Paging) ([]*model.HostsResult, *commonModel.Paging)
- func ReleaseAllRdb()
- func SelectNqmAgentByConnId(connId string) *nqmModel.Agent
- func UpdateNqmAgentHeartbeat(reqs []*nqmModel.HeartbeatRequest)
- type DbHolder
Constants ¶
View Source
const ( DB_PORTAL = "portal" DB_GRAPH = "graph" DB_BOSS = "boss" )
Variables ¶
View Source
var DbFacade *f.DbFacade
Functions ¶
func AcquireLock ¶
func BuildCacheOfPingList ¶
func BuildCacheOfPingList(agentID int32, checkedTime time.Time) *model.PingListLog
1. Update(or INSERT) the refresh time 2. Re-build the list of targets
func DiagnoseRdb ¶
Performs the diagnosis to RDB
func FalconAgentHeartbeat ¶
func FalconAgentHeartbeat(agents []*cModel.FalconAgentHeartbeat, updateOnly bool) *cModel.FalconAgentHeartbeatResult
func FreeLock ¶
func FreeLock( scheduleLog *model.OwlScheduleLog, endStatus model.TaskStatus, endMsg string, endTime time.Time, )
func GetAgentConfig ¶
func GetAgentConfig(key string) *model.AgentConfigResult
func GetPingListFromCache ¶
func GetPingListFromCache(agentID int32, checkedTime time.Time) ([]*nqmModel.HeartbeatTarget, *model.PingListLog)
Gets the ping list from cache
func GetScheduleLog ¶
func GetScheduleLog(uuid uuid.UUID) *model.OwlScheduleLog
func InitBossRdb ¶
func InitGraphRdb ¶
func InitPortalRdb ¶
func InsertNqmAgentByHeartbeat ¶
func InsertNqmAgentByHeartbeat(r *nqmModel.HeartbeatRequest) *nqmModel.Agent
func ListHostgroups ¶
func ListHostgroups(paging commonModel.Paging) ([]*model.HostgroupsResult, *commonModel.Paging)
ListHostgroups returns the info of hostgroups by group ID
func ListHosts ¶
func ListHosts(paging commonModel.Paging) ([]*model.HostsResult, *commonModel.Paging)
ListHosts returns the info of hosts by host ID
func ReleaseAllRdb ¶
func ReleaseAllRdb()
func SelectNqmAgentByConnId ¶
func UpdateNqmAgentHeartbeat ¶
func UpdateNqmAgentHeartbeat(reqs []*nqmModel.HeartbeatRequest)
Types ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.