opamp

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2026 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewLoggerFromZap

func NewLoggerFromZap(l *zap.Logger, name string) types.Logger

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 CollectorAgent struct {
	ID            string
	CollectorName string
}

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.

type Logger

type Logger struct {
	// contains filtered or unexported fields
}

func (*Logger) Debugf

func (o *Logger) Debugf(_ context.Context, format string, v ...any)

Debugf implements types.Logger.

func (*Logger) Errorf

func (o *Logger) Errorf(_ context.Context, format string, v ...any)

Errorf implements types.Logger.

Jump to

Keyboard shortcuts

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