instance.lookup/v1
A companion to instance.source/v1 for sources that don't hold every instance: the host asks on every request it can't route, and the provider answers from its cache or fetches.
A host-scope service contract (lookup.go).
Use
When something provides it on the host's scope, ext/multisite routes every
request's hostname through Lookup(ctx, host) instead of its directory. Found: false is 404; an error is 503 (the
answer isn't known, for instance while the control plane can't be reached and the host isn't cached).
Provide
Implement lookupv1.Lookup and provide it in a host extension's RegisterHost, beside instance.source/v1:
lookupv1.Contract.ProvideIn(h.Scope, myLookup)
The source's Watch should still report changes to instances it handed out, so the runtime recycles or stops them.
ext/mothership/client is the provider.
Extensions
| Extension | |
|---|---|
| mothership | provides |
License
MIT
Questions and comments
Comments are a GitHub Discussions thread; sign in with GitHub to post.