registry

package
v0.9.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 23, 2026 License: MIT Imports: 3 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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

View Source
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
	UpdatedMs int64  `json:"updated_ms"`
}

Entry = a record for a single thrall.

type NamedEntry

type NamedEntry struct {
	Name string
	Entry
}

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 Open

func Open(nc *nats.Conn) (*Registry, error)

Open creates/opens the registry KV bucket over the given NATS connection.

func (*Registry) Get

func (r *Registry) Get(name string) (Entry, bool, error)

Get reads a thrall's state; ok=false if the key does not exist.

func (*Registry) List

func (r *Registry) List() ([]NamedEntry, error)

List returns all registry records.

func (*Registry) Set

func (r *Registry) Set(name string, e Entry) error

Set writes/updates a thrall's state.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL