Documentation ¶
Overview ¶
Package agents contains business logic of working with pmm-agent.
Index ¶
- type Registry
- func (r *Registry) CheckConnectionToService(ctx context.Context, service *models.Service, agent *models.Agent) error
- func (r *Registry) Collect(ch chan<- prom.Metric)
- func (r *Registry) Describe(ch chan<- *prom.Desc)
- func (r *Registry) IsConnected(pmmAgentID string) bool
- func (r *Registry) Kick(ctx context.Context, pmmAgentID string)
- func (r *Registry) Run(stream agentpb.Agent_ConnectServer) error
- func (r *Registry) SendSetStateRequest(ctx context.Context, pmmAgentID string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
Registry keeps track of all connected pmm-agents.
TODO Split into several types?
func NewRegistry ¶
func NewRegistry(db *reform.DB, prometheus prometheus, qanClient qanClient) *Registry
NewRegistry creates a new registry with given database connection.
func (*Registry) CheckConnectionToService ¶
func (r *Registry) CheckConnectionToService(ctx context.Context, service *models.Service, agent *models.Agent) error
CheckConnectionToService sends request to pmm-agent to check connection to service.
func (*Registry) IsConnected ¶
IsConnected returns true if pmm-agent with given ID is currently connected, false otherwise.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.