Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,31 @@ def handler(event, ctx):
return {"charged": charge["id"], "packed": packed.results}
```

Use the function name for its source directory and manifest entry:

```text
volcano/functions/order-pipeline/
├── main.py
└── requirements.txt
```

```text
# volcano/functions/order-pipeline/requirements.txt
volcano-sdk-python
```

```yaml
# volcano-config.yaml
version: 1
project:
name: my-app
functions:
- name: order-pipeline
kind: durable
```

The decorator defines handler behavior. The manifest declaration makes the function discoverable by `volcano durable deploy`.

Every context operation is checkpointed: what finished is recorded, and a
resumed execution replays that recorded outcome instead of doing the work again.
That is the one rule the handler has to respect — the code between operations
Expand Down
24 changes: 24 additions & 0 deletions docs/functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,30 @@ def handler(event, ctx):
return {"charge_id": charge["id"]}
```

Place the handler and its dependency file under the function name:

```text
volcano/functions/charge-order/
├── main.py
└── requirements.txt
```

```text
# volcano/functions/charge-order/requirements.txt
volcano-sdk-python
```

Declare the same name as durable in `volcano-config.yaml`; the decorator does not register the function with the CLI:

```yaml
version: 1
project:
name: my-app
functions:
- name: charge-order
kind: durable
```

Volcano records each context operation. Resumed executions replay recorded results instead of repeating completed work. Keep changing decisions inside `ctx.step()`. Use `ctx.wait_until()` to poll application state. Volcano does not expose externally completed callbacks.

## Run durable functions locally
Expand Down
Loading