nqm

package
v3.14.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2017 License: Apache-2.0, Apache-2.0 Imports: 9 Imported by: 0

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

func (*AgentHbsService) Stop

func (s *AgentHbsService) Stop()

Release resources of this service

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

Jump to

Keyboard shortcuts

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