Help us shape the future of Go! Take the 2026 Go Developer Survey

bootstrap

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Overview

Package bootstrap assembles the application and its infrastructure.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Runtime

type Runtime struct {
	// contains filtered or unexported fields
}

Runtime loads and owns the configured application services.

func New

func New(configFile *configlib.ConfigFile[appconfig.Settings]) *Runtime

New creates a lazily configured runtime.

func (*Runtime) Application

func (runtime *Runtime) Application(ctx context.Context) (*app.Application, error)

Application lazily loads configuration and builds one shared application. Initialization is serialized; canceled callers do not load configuration or create resources.

func (*Runtime) Close

func (runtime *Runtime) Close() error

Close releases resources in reverse construction order and joins all close errors. Repeated calls do not close the same resources twice. Close ends the runtime lifecycle.

Jump to

Keyboard shortcuts

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