relay

package
v0.57.2 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2026 License: Unlicense Imports: 25 Imported by: 0

Documentation

Overview

Package relay provides shared startup logic for running the ORLY relay. This allows both the root binary and the unified binary to share the same initialization code for monolithic deployments.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeDatabaseConfig

func MakeDatabaseConfig(cfg *config.C) *database.DatabaseConfig

MakeDatabaseConfig creates a database.DatabaseConfig from the app config.

func RunWithSignals

func RunWithSignals(cfg *config.C) error

RunWithSignals calls Startup and blocks on signals, handling graceful shutdown. This is the main entry point for running the relay as a standalone process.

Types

type StartupResult

type StartupResult struct {
	Ctx     context.Context
	Cancel  context.CancelFunc
	DB      database.Database
	Limiter *ratelimit.Limiter
	Quit    chan struct{}
}

StartupResult holds the initialized components from Startup.

func Startup

func Startup(cfg *config.C) (*StartupResult, error)

Startup initializes the database, ACL, rate limiter, and starts the relay server. It returns a StartupResult containing all initialized components.

Source Files

  • startup.go

Jump to

Keyboard shortcuts

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