opamp

package
v0.1.2-debug-auth Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2025 License: MIT Imports: 14 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package opamp provides the implementation of the OpAMP use case for managing connections and agents.

Index

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) Name added in v0.0.16

func (s *Service) Name() string

Name returns the name of the 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) Run added in v0.0.15

func (s *Service) Run(ctx context.Context) error

Run starts a loop to handle asynchronous operations for the service.

Jump to

Keyboard shortcuts

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