bootstrap

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2026 License: MIT Imports: 12 Imported by: ? 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 bootstrap provides shared application lifecycle logic and bootstrap helpers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Lifecycle

func Lifecycle() fx.Option

Lifecycle returns a fx application lifecycle including application start and stop hooks.

func NewServerApp

func NewServerApp(modules fx.Option) *fx.App

NewServerApp creates a server application from the given modules.

func NewWorkerApp

func NewWorkerApp(modules fx.Option, subscriptions []string) *fx.App

NewWorkerApp creates a worker application from the given modules, activating only the named subscriptions. An empty subscriptions slice activates all subscriptions.

Types

type ConsoleApp

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

ConsoleApp runs an app to run as CLI using cobra root command inside a started fx application.

func NewConsoleApp

func NewConsoleApp(modules fx.Option, rootCmd *cobra.Command) *ConsoleApp

func (*ConsoleApp) Run

func (c *ConsoleApp) Run(args []string) error

type Info

type Info struct {
	Name        string
	Version     string
	Environment string
	Debug       bool
}

Info identifies the running application.

Jump to

Keyboard shortcuts

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