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: 0

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