Some checks failed
Run Check Script / check (pull_request) Failing after 10s
1.4 KiB
1.4 KiB
Developer Guide
This section covers how to extend Harmony by building your own Score, Topology, and Capability implementations.
Writing a Score
A Score is a declarative description of desired state. To create your own:
- Define a struct that represents your desired state
- Implement the
Score<T>trait, whereTis your targetTopology - Implement the
Interpret<T>trait to define how the Score translates to infrastructure actions
See the Writing a Score guide for a step-by-step walkthrough.
Writing a Topology
A Topology models your infrastructure environment. To create your own:
- Define a struct that holds your infrastructure configuration
- Implement the
Topologytrait - Implement the
Capabilitytraits your Score needs
See the Writing a Topology guide for details.
Adding Capabilities
Capabilities are the specific APIs or features a Topology exposes. They are the bridge between Scores and the actual infrastructure.
See the Adding Capabilities guide for details on implementing and exposing Capabilities.
Core Traits Reference
| Trait | Purpose |
|---|---|
Score<T> |
Declares desired state ("what") |
Topology |
Represents infrastructure ("where") |
Interpret<T> |
Execution logic ("how") |
Capability |
A feature exposed by a Topology |
See Core Concepts for the conceptual foundation.