command

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2026 License: Apache-2.0 Imports: 9 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 command owns the process lifecycle the API and worker binaries share: configuration, logging, the cgroup heap cap, signal handling and the shared dependency graph. Each binary keeps its own domain wiring.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Main

func Main(service string, run func(context.Context, *config.Config, *slog.Logger) error)

Main runs a service's process lifecycle and exits non-zero on error. It loads the configuration, installs the logger, caps the heap, and then calls Run, which validates the configuration and calls run with a context cancelled by SIGINT/SIGTERM.

run owns everything after that, including migrations (they must run before the shared pool opens), the graph through OpenCore and the service wiring.

func OpenCore

func OpenCore(ctx context.Context, cfg *config.Config, logger *slog.Logger, opts app.Options) (*app.Core, error)

OpenCore builds the dependency graph the API and the worker share and starts the runtime profiles listener. The caller defers Close on the returned Core.

func Run

func Run(cfg *config.Config, logger *slog.Logger, run func(context.Context, *config.Config, *slog.Logger) error) error

Run is the process lifecycle without the exit. It validates the configuration and calls run with a context cancelled by SIGINT/SIGTERM.

Types

This section is empty.

Jump to

Keyboard shortcuts

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