Execution Unit
@klotho::execution_unit
Execution unit is the smallest deployable grouping of code. The annotation does not necessarily guarantee the code will end up in separate units: it just defines the ability to be split. The absence of an execution_unit
capability in a file implies that it goes in all units.
Klotho will make a best effort attempt to remove any dead code from execution units.
note
Currently, units are always split, with no mechanism for recombining them. The ability to recombine execution units is an upcoming feature.
Directives
Directive | Type | Description |
---|---|---|
id | string | (Required) The name of the execution unit. Files with the same execution unit name are guaranteed to stay together. |
keep_warm | boolean | Warning: Experimental and subject to change. Whether this execution unit should be kept warm (AWS Lambda only). |
Configuration
Execution Units can be further configured within the Klotho configuration.
Providers
- AWS
- GCP
Supported aws executor types include:
caution
GCP hasn't been updated to v1 yet, so this is just a projection of what it may be.
Currently, only CloudRun is supported as the executor.