app

package
v1.6.1 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2026 License: Apache-2.0 Imports: 14 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	LogTrace = LogLevel(syslog.LvTrace)
	LogDebug = LogLevel(syslog.LvDebug)
	LogWarn  = LogLevel(syslog.LvWarn)
	LogError = LogLevel(syslog.LvError)
)

Functions

func Settings added in v1.5.0

func Settings(ops ...SettingOption)

Types

type App

type App struct {
	configure.Configure
	container.Factory

	ApplicationRunners []definition.ApplicationRunner        `wire:",required=false"`
	CloserComponents   []definition.CloserComponent          `wire:",required=false"`
	EventListeners     []definition.ApplicationEventListener `wire:",required=false"`
	// contains filtered or unexported fields
}

func NewApp

func NewApp() *App

func (*App) Close added in v1.2.13

func (s *App) Close()

func (*App) CloseWithContext added in v1.6.0

func (s *App) CloseWithContext(ctx context.Context)

func (*App) PublishEvent added in v1.6.0

func (s *App) PublishEvent(event definition.ApplicationEvent) error

func (*App) Run

func (s *App) Run(ops ...SettingOption) error

func (*App) RunWithContext added in v1.6.0

func (s *App) RunWithContext(ctx context.Context, ops ...SettingOption) error

type SettingOption

type SettingOption func(s *App)

func AddConfigLoader added in v1.4.0

func AddConfigLoader(loaders ...configure.Loader) SettingOption

func LogLevel added in v1.3.1

func LogLevel(lv syslog.Lv) SettingOption

func Options added in v1.3.3

func Options(ops ...SettingOption) SettingOption

func SetComponents

func SetComponents(cs ...any) SettingOption

func SetConfig

func SetConfig(cfg string) SettingOption

func SetConfigBinder added in v1.2.0

func SetConfigBinder(binder configure.Binder) SettingOption

func SetConfigLoader added in v1.2.0

func SetConfigLoader(loaders ...configure.Loader) SettingOption

func SetConfigure

func SetConfigure(c configure.Configure) SettingOption

func SetFactory

func SetFactory(factory container.Factory) SettingOption

func SetLogger added in v1.3.1

func SetLogger(l syslog.Logger) SettingOption

func SetShutdownTimeout added in v1.6.0

func SetShutdownTimeout(d time.Duration) SettingOption

func SkipRunners added in v1.6.1

func SkipRunners() SettingOption

Jump to

Keyboard shortcuts

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