port

package
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package port is a package that defines the ports for the application layer.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AdminUsecase

type AdminUsecase interface {
	ApplyRawConfig(ctx context.Context, targetInstanceUID uuid.UUID, config any) error
	ListConnections(ctx context.Context) ([]*model.Connection, error)
}

AdminUsecase is a use case that handles admin operations.

type AgentManageUsecase added in v0.1.0

type AgentManageUsecase interface {
	GetAgent(ctx context.Context, instanceUID uuid.UUID) (*model.Agent, error)
	ListAgents(ctx context.Context) ([]*model.Agent, error)
	SendCommand(ctx context.Context, targetInstanceUID uuid.UUID, command *model.Command) error
}

AgentManageUsecase is a use case that handles agent management operations.

type CommandLookUpUsecase added in v0.1.0

type CommandLookUpUsecase interface {
	// GetCommand retrieves a command by its ID.
	GetCommand(ctx context.Context, commandID uuid.UUID) (*model.Command, error)
	// GetCommandByInstanceUID retrieves a command by its instance UID.
	GetCommandByInstanceUID(ctx context.Context, instanceUID uuid.UUID) ([]*model.Command, error)
	// ListCommands lists all commands.
	ListCommands(ctx context.Context) ([]*model.Command, error)
}

CommandLookUpUsecase is a use case that handles command operations.

type OpAMPUsecase

type OpAMPUsecase interface {
	OnConnected(ctx context.Context, conn opamptypes.Connection)
	OnMessage(ctx context.Context, conn opamptypes.Connection, message *protobufs.AgentToServer) *protobufs.ServerToAgent
	OnConnectionClose(conn opamptypes.Connection)
}

OpAMPUsecase is a use case that handles OpAMP protocol operations. Please see github.com/open-telemetry/opamp-go/server/types/ConnectionCallbacks.

Jump to

Keyboard shortcuts

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