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
34 changes: 24 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ What you get out of the box:
- **Lifecycle-safe**: a linked worker is torn down cooperatively when its creating
instance closes, and every worker is drained when the runtime shuts down.

> **Stability:** experimental (`v0.1.0`). The API may change before `v1.0.0`.
> **Stability:** experimental (`v0.0.0`). The API may change without notice.

## Installation

Expand All @@ -70,21 +70,35 @@ go get github.com/wago-org/workers
```

The plugin requires two privileged capabilities - `instance.manage` (to fork and manage
worker instances) and `instance.lifecycle` (to observe parent shutdown). Grant them in
your `wago.json`:
worker instances) and `instance.lifecycle` (to observe parent shutdown). Select the
plugin in `wago.json`:

```json
{
"dependencies": ["github.com/wago-org/workers"],
"plugins": [
{
"name": "workers",
"$schema": "https://wago.sh/v0/schema.json",
"plugins": {
"wago-org/workers": "^0.0.0"
}
}
```

Exact versions and reviewed authority belong in `wago-lock.json`:

```json
{
"plugins": {
"wago-org/workers": {
"version": "0.0.0",
"requiredCapabilities": [
"instance.manage",
"instance.lifecycle"
],
"capabilities": {
"instance.manage": { "maxInstances": 64 },
"instance.lifecycle": true
}
}
]
}
}
```

Expand Down Expand Up @@ -348,8 +362,8 @@ go test -race ./...
runtime-close drain).
- **`register/`** - a blank-import shim that activates init-time registration for
Wago-generated hosts.
- **`wago.json`** - the package manifest declaring the plugin and its required
capabilities.
- **`wago.json`** - the package manifest declaring plugin dependencies and
version constraints; reviewed capabilities live in `wago-lock.json`.

Design notes:

Expand Down
13 changes: 3 additions & 10 deletions wago.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,13 @@
{
"$schema": "https://wago.sh/schema.json",
"schema": "wago/v1",
"$schema": "https://wago.sh/v0/schema.json",
"module": "github.com/wago-org/workers",
"version": "0.1.0",
"version": "0.0.0",
"name": "Wago Workers",
"short": "workers",
"description": "Bounded, composable WebAssembly worker primitives for Wago plugins.",
"license": "Apache-2.0",
"repository": "https://github.com/wago-org/workers",
"homepage": "https://github.com/wago-org/workers#readme",
"category": "concurrency",
"tags": ["workers", "concurrency", "webassembly"],
"plugins": [
{
"name": "workers",
"capabilities": ["instance.manage", "instance.lifecycle"]
}
]
"tags": ["workers", "concurrency", "webassembly"]
}
2 changes: 1 addition & 1 deletion workers.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ func New(opts ...Option) *Plugin {

func (*Plugin) Info() wago.ExtensionInfo {
return wago.ExtensionInfo{
ID: "wago.workers", Name: "Workers", Version: "0.1.0",
ID: "wago.workers", Name: "Workers", Version: "0.0.0",
Description: "Bounded, extension-scoped WebAssembly worker primitives",
Stability: wago.Experimental, Repository: "https://github.com/wago-org/workers",
License: "Apache-2.0", Tags: []string{"workers", "concurrency", "plugin-foundation"},
Expand Down
Loading