Documentation
¶
Overview ¶
Package sections is discovery the product defines: a service offers a section — a proto message of the product's under a name — and any service follows that name across the installation, without a registry of its own.
sections.Offer(root, "komeet.module", &modulev1.Manifest{Name: "media", ...})
modules := sections.Follow[*modulev1.Manifest](root, "komeet.module")
for service, m := range modules.Get() { ... }
The section goes into the service's manifest. Backplane publishes, by name, the sections of every serving service (its highest serving version) to Consul KV backplane/sections/<name>; Follow watches that key while the service runs. Without Consul nothing is known.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Ref ¶
Ref follows one section name: the section of every serving service that offers it. Its methods are safe for concurrent use.
func Follow ¶
Follow follows section name, decoded as T (a pointer to a generated message). A service that offers name with another message is left out.
func (Ref[T]) Changes ¶
Changes signals after every change of the set until ctx ends; one pending signal at most.