rdb

package
v0.0.0-...-5416f79 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2017 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DB_PORTAL = "portal"
	DB_GRAPH  = "graph"
)

Variables

View Source
var DbFacade = &f.DbFacade{}

Functions

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

func DiagnoseRdb(dsn string, db *sql.DB) *apiModel.Rdb

Performs the diagnosis to RDB

func FalconAgentHeartbeat

func FalconAgentHeartbeat(agents []*cModel.FalconAgentHeartbeat, updateOnly bool) *cModel.FalconAgentHeartbeatResult

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 InitGraphRdb

func InitGraphRdb(dbConfig *commonDb.DbConfig)

func InitPortalRdb

func InitPortalRdb(dbConfig *commonDb.DbConfig)

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 SelectNqmAgentByConnId(connId string) *nqmModel.Agent

func UpdateNqmAgentHeartbeat

func UpdateNqmAgentHeartbeat(reqs []*nqmModel.HeartbeatRequest)

Types

type DbHolder

type DbHolder struct {
	// contains filtered or unexported fields
}
var GlobalDbHolder *DbHolder = &DbHolder{
	facades: make(map[string]*f.DbFacade),
}

func (*DbHolder) Diagnose

func (self *DbHolder) Diagnose(dbname string) *apiModel.Rdb

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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