Developer Guide
Architecture overview, contribution guidelines, and API reference for Parallax
This document describes the architecture of Parallax, how to contribute, and provides a brief API overview.
Architecture Overview
text
+-------------+ +---------------+ +----------------+
| CLI (cobra) | --> | Core Packages | --> | Module Runtime |
+-------------+ +---------------+ +----------------+- CLI Layer: Located under
cmd/andpkg/cmd. It defines commands such asplayand handles configuration. - Core Packages: Found in
pkg/, these handle inventory parsing, playbook parsing, remote connections, and module execution. - Module Runtime: Implemented in
pkg/moduleandmodule-sdk, providing built-in modules and a framework for custom modules.
Contribution Guidelines
- Use Conventional Commits:
type(scope): brief description, with an optional scope. Examples:fix(play): preserve handler host scope,feat(ci): add Windows runners, anddocs: clarify setup. Use!or aBREAKING CHANGE:footer for breaking changes. - Run
task lint,task test, andtask acceptancebefore submitting a merge request.task testincludes both the controller and nested module SDK with race detection. - Format code with
gofmt. - Documentation updates should accompany code changes when relevant.
API Overview
The key packages are:
inventory: Parses INI, YAML, and dynamic inventory sources and resolves host patterns.playbook: Loads and validates YAML playbooks.remote: Provides SSH, WinRM, and local connection implementations.module: Contains the module executor and registry.
Each package exposes well-documented Go types and functions. See the source files under pkg/ for details.