registry

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package registry loads the list of services the citadel-logs daemon watches.

Sources of truth:

  • ~/.citadel/registry.yml (host) — list of {repo, env} entries.
  • <repo>/citadel.yml — name, region, runtime, and lambda details per service.

The registry intentionally does not call DeployConfig.Validate because the daemon only needs identity + ingestion metadata (name, region, runtime, log group target). It is OK for a Lambda repo to omit container fields.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Entry

type Entry struct {
	Repo string `yaml:"repo"`
	Env  string `yaml:"env"`
}

Entry is a single line in registry.yml.

type File

type File struct {
	Services []Entry `yaml:"services"`
}

File is the on-disk shape of registry.yml.

func LoadFile

func LoadFile(path string) (*File, error)

LoadFile parses a registry.yml. Empty file is valid (zero services).

type Service

type Service struct {
	ID       string
	Name     string
	Env      string
	Region   string
	Runtime  config.Runtime
	RepoPath string
	// LambdaFunction is populated only when Runtime == RuntimeLambda.
	LambdaFunction string
}

Service is a fully-resolved view of a registered service after reading both registry.yml and the repo's citadel.yml. ID is "<name>-<env>".

func Resolve

func Resolve(registryPath string) ([]Service, []error)

Resolve loads the registry file and each referenced citadel.yml, returning the list of services the daemon should watch. Errors on one entry do not abort the whole load — they are returned alongside the successful entries so the daemon can surface "degraded" services in the UI rather than failing to start.

Jump to

Keyboard shortcuts

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