Skip to main content

Concepts

Capabilities

Klotho capability annotations are used to control the behaviour of the compiler. They're specified as comments preceding the code to be transformed (except execution_unit which is at a file-level) in the following format:

/* @klotho::capability {
* }
*/

Annotation

We use the term 'annotation' to refer to a specific instance of a capability inside your code. These must have a unique ID and can be configured individually.

Directives

Directives are used to take fine-grained control over the compiler - to guide it when it doesn't have enough information based on the code to make the desired transformations. These are specified in a block (starting with { and ending with }) and in TOML format.

@klotho::capability {
key_1 = "value 1"
key_2 = 123

[obj_1]
obj_key_1 = true
}

The specific directives supported will vary based on the capability, cloud provider, and technology used. Check the capability documentation for more details.