Documentation
¶
Overview ¶
Package opamp provides the implementation of the OpAMP use case for managing connections and agents.
Index ¶
- Constants
- type Service
- func (s *Service) Name() string
- func (s *Service) OnConnected(ctx context.Context, conn types.Connection)
- func (s *Service) OnConnectionClose(conn types.Connection)
- func (s *Service) OnMessage(ctx context.Context, conn types.Connection, message *protobufs.AgentToServer) *protobufs.ServerToAgent
- func (s *Service) OnReadMessageError(conn types.Connection, messageType int, msgByte []byte, err error)
- func (s *Service) Run(ctx context.Context) error
Constants ¶
View Source
const ( // DefaultOnConnectionCloseTimeout is the default timeout for closing a connection. DefaultOnConnectionCloseTimeout = 5 * time.Second )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service struct {
OnConnectionCloseTimeout time.Duration
// contains filtered or unexported fields
}
Service is a struct that implements the OpAMPUsecase interface.
func New ¶
func New( agentUsecase domainport.AgentUsecase, commandUsecase domainport.CommandUsecase, connectionUsecase domainport.ConnectionUsecase, logger *slog.Logger, ) *Service
New creates a new instance of the OpAMP service.
func (*Service) OnConnected ¶ added in v0.0.15
func (s *Service) OnConnected(ctx context.Context, conn types.Connection)
OnConnected implements port.OpAMPUsecase.
func (*Service) OnConnectionClose ¶ added in v0.0.15
func (s *Service) OnConnectionClose(conn types.Connection)
OnConnectionClose implements port.OpAMPUsecase.
func (*Service) OnMessage ¶ added in v0.0.15
func (s *Service) OnMessage( ctx context.Context, conn types.Connection, message *protobufs.AgentToServer, ) *protobufs.ServerToAgent
OnMessage implements port.OpAMPUsecase.
func (*Service) OnReadMessageError ¶ added in v0.1.18
func (s *Service) OnReadMessageError( conn types.Connection, messageType int, msgByte []byte, err error, )
OnReadMessageError implements port.OpAMPUsecase.
Click to show internal directories.
Click to hide internal directories.