Documentation
¶
Index ¶
- func NewLoggerFromZap(l *zap.Logger, name string) types.Logger
- type AgentConnectionManager
- func (m *AgentConnectionManager) AddConnection(conn types.Connection, message *protobufs.AgentToServer)
- func (m *AgentConnectionManager) DispatchRestartCommand(ctx context.Context) error
- func (m *AgentConnectionManager) IsAgentManaged(agentName string) bool
- func (m *AgentConnectionManager) RemoveConnection(conn types.Connection)
- type CollectorAgent
- type ConnectionManager
- type Logger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AgentConnectionManager ¶
type AgentConnectionManager struct {
// contains filtered or unexported fields
}
func NewAgentConnectionManager ¶
func NewAgentConnectionManager(ctx context.Context, logger *zap.Logger) *AgentConnectionManager
func (*AgentConnectionManager) AddConnection ¶
func (m *AgentConnectionManager) AddConnection(conn types.Connection, message *protobufs.AgentToServer)
AddConnection adds a new connection to the list of underlying connected agents.
func (*AgentConnectionManager) DispatchRestartCommand ¶
func (m *AgentConnectionManager) DispatchRestartCommand(ctx context.Context) error
DispatchRestartCommand sends the CommandType_Restart event to all connected opamp agents.
func (*AgentConnectionManager) IsAgentManaged ¶ added in v0.3.1
func (m *AgentConnectionManager) IsAgentManaged(agentName string) bool
IsAgentManaged checks if the provided agent name is managed by the connection manager.
func (*AgentConnectionManager) RemoveConnection ¶
func (m *AgentConnectionManager) RemoveConnection(conn types.Connection)
RemoveConnection removes the provided opamp connection from the list of underlying connected agents.
type CollectorAgent ¶ added in v0.3.1
type ConnectionManager ¶
type ConnectionManager interface {
AddConnection(conn types.Connection, message *protobufs.AgentToServer)
RemoveConnection(conn types.Connection)
DispatchRestartCommand(ctx context.Context) error
IsAgentManaged(agentName string) bool
}
ConnectionManager is for managing connected agents for an opamp server.
Click to show internal directories.
Click to hide internal directories.