opamp

package
v0.0.13 Latest Latest
Warning

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

Go to latest
Published: May 2, 2025 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

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

Service is a struct that implements the OpAMPUsecase interface.

func New

func New(
	connectionUsecase domainport.ConnectionUsecase,
	agentUsecase domainport.AgentUsecase,
	commandUsecase domainport.CommandUsecase,
	logger *slog.Logger,
) *Service

New creates a new instance of the OpAMP service.

func (*Service) DisconnectAgent

func (s *Service) DisconnectAgent(instanceUID uuid.UUID) error

DisconnectAgent disconnects the agent by its instance UID.

func (*Service) FetchServerToAgent

func (s *Service) FetchServerToAgent(
	ctx context.Context,
	instanceUID uuid.UUID,
) (*protobufs.ServerToAgent, error)

FetchServerToAgent fetch a message.

func (*Service) HandleAgentToServer

func (s *Service) HandleAgentToServer(ctx context.Context, agentToServer *protobufs.AgentToServer) error

HandleAgentToServer handle a message from agent.

Jump to

Keyboard shortcuts

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