Documentation
¶
Overview ¶
Package registry holds a name -> state map in a NATS KV bucket ("aether_registry"). Deliberately KV, not an in-memory map - it works the same in embedded and external mode and in a cluster it is visible across nodes (even for `aether ps` from another process).
Index ¶
Constants ¶
const Bucket = "aether_registry"
Bucket is the name of the registry KV bucket.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Entry ¶
type Entry struct {
PID int `json:"pid"`
Node string `json:"node"`
Status string `json:"status"` // starting | ready | down | stale
UpdatedMs int64 `json:"updated_ms"`
Version string `json:"version,omitempty"`
CallOps []string `json:"call_ops,omitempty"`
CastOps []string `json:"cast_ops,omitempty"`
LastError string `json:"last_error,omitempty"`
LastErrorMs int64 `json:"last_error_ms,omitempty"`
Metadata map[string]string `json:"metadata,omitempty"`
}
Entry = a record for a single thrall. Beyond liveness (pid/node/status), it carries the thrall's self-description: the operations it answers and its self-declared version (from the heartbeat), the reason of its most recent failure, and the deployment metadata the operator declared in the manifest. The descriptive fields are optional so a thrall that reports nothing keeps a minimal record and the KV JSON stays readable.
type NamedEntry ¶
NamedEntry = an Entry together with its key (the thrall's name) - for listing.
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
Registry wraps the registry KV bucket.
func (*Registry) List ¶
func (r *Registry) List() ([]NamedEntry, error)
List returns all registry records.