opampcommander

module
v0.1.26 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2026 License: MIT

README

OpAMP Commander

Components

opampctl
  • opampctl is a command line tool to control opampcommander.
Install
# opampctl
go install github.com/minuk-dev/opampcommander/cmd/opampctl@latest

# create config file
opampctl config init
apiserver
  • apiserver is a server component to support OpAMP
How to run
  • TBD

Development

Infrastructure Setup

This project uses MongoDB 4.4 as its database (for Raspberry Pi compatibility) and Kafka for distributed messaging. The Makefile provides convenient commands:

# Start MongoDB 4.4 (data persisted in ./default.mongodb)
make start-mongodb

# Start Kafka (for distributed mode)
make start-kafka

# Start all development services (MongoDB + Kafka)
make start-dev-services

# Stop services (data is preserved)
make stop-dev-services

# Clean all data (WARNING: removes all data)
make clean-dev-services
Development Commands
# Build and run apiserver with default settings
make run-dev-server

# Run standalone server (MongoDB only, no Kafka)
make run-standalone

# Run with custom arguments
make ARGS="--log.level=warn --log.format=text --metric.enabled" dev

# Run with GIN_MODE=release
GIN_MODE=release make ARGS="--log.level=warn --log.format=text --metric.enabled" dev
Testing
# Run unit tests
make unittest

# Run all tests including integration tests
make test

# Run E2E tests (requires Docker)
make test-e2e

# Run only Kafka E2E tests
make test-e2e-kafka

# Run only basic E2E tests
make test-e2e-basic

Release

Deployment

Directories

Path Synopsis
api
Package api contains API models and definitions.
Package api contains API models and definitions.
v1
Package v1 provides the API server for the application.
Package v1 provides the API server for the application.
v1/agent
Package agent provides the agent API for the server
Package agent provides the agent API for the server
v1/agentgroup
Package agentgroup provides the agentgroup API for the server
Package agentgroup provides the agentgroup API for the server
v1/auth
Package auth provides the authentication api for the opampcommander application
Package auth provides the authentication api for the opampcommander application
v1/command
Package command provides the command api model for opampcommander.
Package command provides the command api model for opampcommander.
v1/connection
Package connection provides the connection model and its methods
Package connection provides the connection model and its methods
v1/ping
Package ping provides the ping controller for the HTTP API.
Package ping provides the ping controller for the HTTP API.
v1/server
Package server provides the API models for server management.
Package server provides the API models for server management.
v1/version
Package version provides api model for version information.
Package version provides api model for version information.
cmd
apiserver command
Package main provides the entry point for the opampcommander apiserver.
Package main provides the entry point for the opampcommander apiserver.
opampctl command
Package main is the entry point for the opampctl command line tool.
Package main is the entry point for the opampctl command line tool.
internal
adapter/common/kafka
Package kafka provides Kafka messaging models.
Package kafka provides Kafka messaging models.
adapter/in/http/auth/basic
Package basic provides a basic authentication controller for the opampcommander API client.
Package basic provides a basic authentication controller for the opampcommander API client.
adapter/in/http/auth/github
Package github provides the GitHub oauth2 authentication controller for the opampcommander.
Package github provides the GitHub oauth2 authentication controller for the opampcommander.
adapter/in/http/v1/agent
Package agent provides domain models for the agent
Package agent provides domain models for the agent
adapter/in/http/v1/agentgroup
Package agentgroup provides HTTP handlers for managing agent groups.
Package agentgroup provides HTTP handlers for managing agent groups.
adapter/in/http/v1/connection
Package connection provides the HTTP controller for managing connections.
Package connection provides the HTTP controller for managing connections.
adapter/in/http/v1/opamp
Package opamp provides the implementation of the OPAMP protocol.
Package opamp provides the implementation of the OPAMP protocol.
adapter/in/http/v1/ping
Package ping provides the ping controller for the HTTP API.
Package ping provides the ping controller for the HTTP API.
adapter/in/http/v1/server
Package server provides the HTTP controller for managing servers.
Package server provides the HTTP controller for managing servers.
adapter/in/http/v1/version
Package version provides server version information.
Package version provides server version information.
adapter/in/messaging/inmemory
Package inmemory implements in-memory messaging adapters for standalone mode.
Package inmemory implements in-memory messaging adapters for standalone mode.
adapter/in/messaging/kafka
Package kafka provides Kafka messaging adapter implementations.
Package kafka provides Kafka messaging adapter implementations.
adapter/out/messaging/kafka
Package kafka implements Kafka messaging adapters.
Package kafka implements Kafka messaging adapters.
adapter/out/persistence/mongodb
Package mongodb provides the MongoDB adapter for the opampcommander application.
Package mongodb provides the MongoDB adapter for the opampcommander application.
adapter/out/persistence/mongodb/entity
Package entity contains common entity definitions for MongoDB persistence.
Package entity contains common entity definitions for MongoDB persistence.
application/mapper
Package mapper provides functions to map between api and domain models.
Package mapper provides functions to map between api and domain models.
application/port
Package port is a package that defines the ports for the application layer.
Package port is a package that defines the ports for the application layer.
application/service/admin
Package admin provides the implementation of the AdminUsecase interface.
Package admin provides the implementation of the AdminUsecase interface.
application/service/agent
Package agent provides application services for the agent
Package agent provides application services for the agent
application/service/agentgroup
Package agentgroup provides the AgentGroupManageService for managing agent groups.
Package agentgroup provides the AgentGroupManageService for managing agent groups.
application/service/opamp
Package opamp provides the implementation of the OpAMP use case for managing connections and agents.
Package opamp provides the implementation of the OpAMP use case for managing connections and agents.
domain/model
Package model provides domain models for the opampcommander application.
Package model provides domain models for the opampcommander application.
domain/model/agent
Package agent provides domain models for the agent
Package agent provides domain models for the agent
domain/model/serverevent
Package serverevent defines server-to-server event models.
Package serverevent defines server-to-server event models.
domain/model/vo
Package vo provides value objects vo package does not have any dependencies on other packages except the standard library
Package vo provides value objects vo package does not have any dependencies on other packages except the standard library
domain/port
Package port provides ports which is defined in the hexagonal architecture.
Package port provides ports which is defined in the hexagonal architecture.
domain/service
Package service provides the service layer for the opampcommander application.
Package service provides the service layer for the opampcommander application.
helper
Package helper provides utility functions for graceful shutdown management.
Package helper provides utility functions for graceful shutdown management.
management
Package management provides core management interfaces and types.
Package management provides core management interfaces and types.
management/healthcheck
Package healthcheck provides health and readiness check functionality.
Package healthcheck provides health and readiness check functionality.
management/observability
Package observability provides observability features for the application.
Package observability provides observability features for the application.
management/pprof
Package pprof provides functionalities for performance profiling.
Package pprof provides functionalities for performance profiling.
security
Package security provides security-related functionality for the opampcommander application.
Package security provides security-related functionality for the opampcommander application.
pkg
apiserver
Package apiserver provides app logic for the opampcommander apiserver.
Package apiserver provides app logic for the opampcommander apiserver.
apiserver/config
Package config provides the configuration for the opampcommander application.
Package config provides the configuration for the opampcommander application.
apiserver/docs
Package docs Code generated by swaggo/swag.
Package docs Code generated by swaggo/swag.
apiserver/module/application
Package application provides the application services module for the API server.
Package application provides the application services module for the API server.
apiserver/module/domain
Package domain provides the domain services module for the API server.
Package domain provides the domain services module for the API server.
apiserver/module/helper
Package helper provides utility functions and types to assist in building the application.
Package helper provides utility functions and types to assist in building the application.
apiserver/module/helper/lifecycle
Package lifecycle provides application lifecycle management.
Package lifecycle provides application lifecycle management.
apiserver/module/helper/management
Package management provides management HTTP server functionality.
Package management provides management HTTP server functionality.
apiserver/module/infrastructure
Package infrastructure provides infrastructure components module for the API server.
Package infrastructure provides infrastructure components module for the API server.
client
Package client provides a client for the opampcommander API server.
Package client provides a client for the opampcommander API server.
clientutil
Package clientutil provides some util functions to set client
Package clientutil provides some util functions to set client
cmd/apiserver
Package apiserver provides the command for the apiserver.
Package apiserver provides the command for the apiserver.
cmd/opampctl
Package opampctl implements the opampctl command line tool.
Package opampctl implements the opampctl command line tool.
cmd/opampctl/config
Package config provides the command line for the opampctl tool.
Package config provides the command line for the opampctl tool.
cmd/opampctl/config/init
Package init provides the init command for opampctl.
Package init provides the init command for opampctl.
cmd/opampctl/config/view
Package view provides the view command for opampctl.
Package view provides the view command for opampctl.
cmd/opampctl/context
Package context provides the context command for opampctl.
Package context provides the context command for opampctl.
cmd/opampctl/context/ls
Package ls provides the ls command for opampctl context.
Package ls provides the ls command for opampctl context.
cmd/opampctl/context/use
Package use provides the use command for opampctl context.
Package use provides the use command for opampctl context.
cmd/opampctl/create
Package create provides the create command for opampctl.
Package create provides the create command for opampctl.
cmd/opampctl/create/agentgroup
Package agentgroup provides the create agentgroup command for opampctl.
Package agentgroup provides the create agentgroup command for opampctl.
cmd/opampctl/deletecmd
Package deletecmd implements the 'opampctl delete' command.
Package deletecmd implements the 'opampctl delete' command.
cmd/opampctl/deletecmd/agentgroup
Package agentgroup implements the 'opampctl delete agentgroup' command.
Package agentgroup implements the 'opampctl delete agentgroup' command.
cmd/opampctl/get
Package get provides the get command for opampctl.
Package get provides the get command for opampctl.
cmd/opampctl/get/agent
Package agent provides the command to get agent information.
Package agent provides the command to get agent information.
cmd/opampctl/get/agentgroup
Package agentgroup implements the 'opampctl get agentgroup' command.
Package agentgroup implements the 'opampctl get agentgroup' command.
cmd/opampctl/get/connection
Package connection provides the command to get connection information.
Package connection provides the command to get connection information.
cmd/opampctl/restart
Package restart provides the restart command for opampctl.
Package restart provides the restart command for opampctl.
cmd/opampctl/set
Package set provides the set command for opampctl.
Package set provides the set command for opampctl.
cmd/opampctl/set/agent
Package agent provides the command to set agent configurations.
Package agent provides the command to set agent configurations.
cmd/opampctl/version
Package version provides a command to print the version of opampctl.
Package version provides a command to print the version of opampctl.
cmd/opampctl/whoami
Package whoami provides the whoami command for opampctl.
Package whoami provides the whoami command for opampctl.
cmdutil
Package cmdutil contains utility functions for command-line commands.
Package cmdutil contains utility functions for command-line commands.
datastructure/sets
Package sets provides a simple implementation of a set data structure.
Package sets provides a simple implementation of a set data structure.
filecache
Package filecache provides a file cache
Package filecache provides a file cache
formatter
Package formatter provides functions to format data structures into different output formats such as YAML, JSON, and text.
Package formatter provides functions to format data structures into different output formats such as YAML, JSON, and text.
ginutil
Package ginutil provides utility functions for working with Gin HTTP framework.
Package ginutil provides utility functions for working with Gin HTTP framework.
opampctl/config
Package config provides the configuration for opampctl.
Package config provides the configuration for opampctl.
opampctl/configutil
Package configutil provides utilities for working with configuration files in the opampctl tool.
Package configutil provides utilities for working with configuration files in the opampctl tool.
testutil
Package testutil provides utility functions and types for testing.
Package testutil provides utility functions and types for testing.
timeutil
Package timeutil provides utility functions for time manipulation.
Package timeutil provides utility functions for time manipulation.
utils/clock
Package clock provides a clock interface.
Package clock provides a clock interface.
version
Package version provides utilities for handling version information.
Package version provides utilities for handling version information.
xsync
Package xsync provides a data structure that allows for concurrent access and modification.
Package xsync provides a data structure that allows for concurrent access and modification.

Jump to

Keyboard shortcuts

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