Skip to content

Commit dec7526

Browse files
committed
docs: polish README and trim migration commentary
1 parent 79d1bbb commit dec7526

1 file changed

Lines changed: 22 additions & 24 deletions

File tree

README.md

Lines changed: 22 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,40 @@
11
# runtime
22

3-
Pilot Protocol runtime glue. Wires the major subsystems together for
4-
the daemon process: handshake, policy, identity, events, streams. This
5-
is the package the daemon's `main.go` constructs and hands to the plugin
6-
register.
3+
Runtime glue for the Pilot Protocol daemon. Wires the major subsystems
4+
together — handshake, policy, identity, events, streams — into a single
5+
`Runtime` value the daemon's `main.go` constructs and hands to the
6+
plugin register.
77

8-
## Layout
9-
10-
| File | What it does |
11-
|---|---|
12-
| `runtime.go` | `Runtime` struct + plugin registration / lifecycle. |
13-
| `identity.go` | Load/save Ed25519 identity from disk. |
14-
| `events.go` | In-process event bus implementation. |
15-
| `streams.go` | `coreapi.Streams` listener registry on top of the driver. |
16-
| `handshake.go` | Adapter that exposes the handshake plugin to the runtime. |
17-
| `policy.go` | Adapter that exposes the policy plugin to the runtime. |
18-
| `policy_manager.go` | Per-network policy-file load + reload helpers. |
19-
20-
## Import paths
8+
## Install
219

2210
```go
2311
import "github.com/pilot-protocol/runtime"
12+
```
2413

14+
## Usage
15+
16+
```go
2517
rt, err := runtime.New(runtime.Config{
2618
IdentityPath: "~/.pilot/identity.json",
2719
PolicyDir: "~/.pilot/policy",
2820
// ...
2921
})
22+
if err != nil {
23+
return err
24+
}
3025
rt.Register(handshakeService)
3126
rt.Register(policyService)
3227
rt.Run(ctx)
3328
```
3429

35-
This package is intentionally the last to extract — it depends on
36-
both `pilot-protocol/handshake` and `pilot-protocol/policy`.
37-
38-
## Releasing
30+
## Layout
3931

40-
Tag a SemVer version (e.g. `v0.1.0`); web4 pulls it in via
41-
`require github.com/pilot-protocol/runtime v0.1.0`. During
42-
co-development the protocol repo uses `replace ../runtime`.
32+
| File | What it does |
33+
|---|---|
34+
| `runtime.go` | `Runtime` struct, plugin registration, lifecycle. |
35+
| `identity.go` | Load/save Ed25519 identity from disk. |
36+
| `events.go` | In-process event bus implementation. |
37+
| `streams.go` | `coreapi.Streams` listener registry on top of the driver. |
38+
| `handshake.go` | Adapter that exposes the handshake plugin to the runtime. |
39+
| `policy.go` | Adapter that exposes the policy plugin to the runtime. |
40+
| `policy_manager.go` | Per-network policy-file load and reload helpers. |

0 commit comments

Comments
 (0)