app

package
v0.6.5 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2025 License: MIT Imports: 14 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Modules

func Modules(modules ...func() Module) opt.Option[App]

func StartTimeout added in v0.4.4

func StartTimeout(timeout time.Duration) opt.Option[App]

func StopTimeout added in v0.4.4

func StopTimeout(timeout time.Duration) opt.Option[App]

Types

type App

type App struct {
	Done chan struct{}
	// contains filtered or unexported fields
}

func New

func New(name, version string, opts ...opt.Option[App]) *App

func (*App) Run

func (app *App) Run()

func (*App) StartBackground added in v0.4.9

func (app *App) StartBackground(ctx context.Context) error

type IModule added in v0.5.0

type IModule interface {
	IntoFxModule() fx.Option
}

type Module added in v0.5.0

type Module struct {
	Name       string
	Public     []any
	Private    []any
	Instances  []any
	Decorators []any
	Invokers   []any
	SubModules []IModule
}

func NewModule added in v0.5.0

func NewModule(opts ...opt.Option[Module]) Module

func NewNamedModule added in v0.5.0

func NewNamedModule(name string, opts ...opt.Option[Module]) Module

func (Module) IntoFxModule added in v0.5.0

func (m Module) IntoFxModule() fx.Option

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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