Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AgentHbsService ¶
type AgentHbsService struct {
// contains filtered or unexported fields
}
Main service of HBS for NQM agent
func NewAgentHbsService ¶
func NewAgentHbsService(config AgentHbsServiceConfig) *AgentHbsService
func (*AgentHbsService) LoadPingList ¶
func (s *AgentHbsService) LoadPingList(agent *nqmModel.NqmAgent, checkedTime time.Time) []commonModel.NqmTarget
Loads ping list for agent at certain time
func (*AgentHbsService) Start ¶
func (s *AgentHbsService) Start()
Start the service for refreshing cache of ping list
type AgentHbsServiceConfig ¶
type AgentHbsServiceConfig struct { // The queue size of refresing cache of ping list QueueSizeOfRefreshCacheOfPingList int // The timeout of cache(minutes) CacheTimeoutMinutes int }
Configuration of HBS service for NQM agent
type AgentService ¶
type AgentService struct {
// contains filtered or unexported fields
}
func NewAgentService ¶
func NewAgentService(cacheConfig cache.DataCacheConfig) *AgentService
func (*AgentService) GetSimpleAgent1ById ¶
func (s *AgentService) GetSimpleAgent1ById(agentId int32) *nqmModel.SimpleAgent1
func (*AgentService) GetSimpleAgent1sByFilter ¶
func (s *AgentService) GetSimpleAgent1sByFilter(filter *nqmModel.AgentFilter) []*nqmModel.SimpleAgent1
This function would cache agents by their id, the hit of database is always happened
type TargetService ¶
type TargetService struct {
// contains filtered or unexported fields
}
func NewTargetService ¶
func NewTargetService(cacheConfig cache.DataCacheConfig) *TargetService
func (*TargetService) GetSimpleTarget1ById ¶
func (s *TargetService) GetSimpleTarget1ById(targetId int32) *nqmModel.SimpleTarget1
func (*TargetService) GetSimpleTarget1sByFilter ¶
func (s *TargetService) GetSimpleTarget1sByFilter(filter *nqmModel.TargetFilter) []*nqmModel.SimpleTarget1
This function would cache targets by their id, the hit of database is always happened
Click to show internal directories.
Click to hide internal directories.