agent/cmd
The main entry point for the GoDoxy Agent, a secure monitoring and proxy agent that runs alongside Docker containers.
Overview
This package contains the main.go entry point for the GoDoxy Agent. The agent is a TLS-enabled server that provides:
- Secure Docker socket proxying with client certificate authentication
- HTTP proxy capabilities for container traffic
- System metrics collection and monitoring
- Health check endpoints
Architecture
Main Function Flow
- Logger Setup: Configures zerolog with console output
- Certificate Loading: Loads CA and server certificates for TLS/mTLS
- Version Logging: Logs agent version and configuration
- Agent Server: Starts the main HTTPS server with agent handlers
- Socket Proxy: Starts Docker socket proxy if configured
- System Monitoring: Starts system info polling
- Graceful Shutdown: Waits for exit signal (3 second timeout)
Configuration
See agent/pkg/env/README.md for configuration options.
Dependencies
agent/pkg/agent- Core agent types and constantsagent/pkg/env- Environment configurationagent/pkg/server- Server implementationsocketproxy/pkg- Docker socket proxyinternal/metrics/systeminfo- System metrics