runtime/v1

What runs a multisite host's instances: pocker as isolates, docker in containers. A host runs exactly one, and every instance runs on it; an instance it can't serve (by PocketBase version, for example) is refused. Having a multisite section makes the binary a host; its runtime is this contract's provider.

A host-scope service contract, one provider (runtime.go).

Use

The stock pocketone binary runs docker when pocketone.yaml has a docker section, else pocker. A build that registers more than one runtime picks with providers::

multisite: {}
providers:
  runtime/v1: docker

Provide

Implement runtimev1.Runtime (Name, Serves, ServeInstance, Ready) and any optional hooks the host calls (Prechecker, Syncer, Starter, Shutdowner, Statser). Provide it in a host extension's RegisterHost, only when it's configured (a second provider on the same host is a conflict at startup unless providers: picks):

runtimev1.Contract.ProvideIn(h.Scope, myRuntime)

Extensions

Extension
docker provides
pocker provides

License

MIT