Versions in this module Expand all Collapse all v0 v0.4.2 Oct 16, 2026 v0.4.1 Oct 15, 2026 v0.4.0 Oct 15, 2026 v0.3.0 Oct 15, 2026 Changes in this version type Bootstrapper + func (b *Bootstrapper) AddComponent(c Component) + type ServiceNameAware interface + SetServiceName func(name string) v0.2.4 Oct 15, 2026 Changes in this version + func Run(cfg Config, userFn func(*App) error) error + type App struct + func NewApp(mgr *shutdown.Manager) *App + func (a *App) AddResource(name string, closer func(context.Context) error) + func (a *App) Context() context.Context + func (a *App) GoBackground(name string, fn func(ctx context.Context)) + func (a *App) RequestShutdown() + func (a *App) SetWaitTimeout(d time.Duration) + type Bootstrapper struct + func New(opts ...BootstrapperOption) (*Bootstrapper, error) + func (b *Bootstrapper) Run(userFn func(*App) error) error + type BootstrapperOption func(*Bootstrapper) + func WithComponent(c Component) BootstrapperOption + func WithMetrics() BootstrapperOption + func WithNNS(nacosCfg nacospkg.Bootstrap, port int, depServices []string, ...) BootstrapperOption + func WithRequiredNNS(nacosCfg nacospkg.Bootstrap, port int, depServices []string, ...) BootstrapperOption + func WithServiceName(name string) BootstrapperOption + func WithShutdownHook(name string, hook func(ctx context.Context) error) BootstrapperOption + func WithShutdownTimeout(d time.Duration) BootstrapperOption + func WithTracing(cfg tracing.Config) BootstrapperOption + type Component interface + Init func(ctx context.Context, app *App, mgr *shutdown.Manager) error + Name func() string + type Config struct + DepServices []string + Nacos nacospkg.Bootstrap + Port int + ServiceName string + ShutdownTimeout time.Duration + Tracing *tracing.Config + type MetricsComponent struct + ServiceName string + func (c *MetricsComponent) Init(_ context.Context, _ *App, _ *shutdown.Manager) error + func (c *MetricsComponent) Name() string + type NNSComponent struct + DepServices []string + NSNOpts []nns.NNSOption + NacosCfg nacos.Bootstrap + Port int + Required bool + func (c *NNSComponent) Init(ctx context.Context, _ *App, mgr *shutdown.Manager) error + func (c *NNSComponent) Name() string + type ShutdownHookComponent struct + ComponentName string + Hook func(ctx context.Context) error + func (c *ShutdownHookComponent) Init(_ context.Context, _ *App, mgr *shutdown.Manager) error + func (c *ShutdownHookComponent) Name() string + type TracingComponent struct + Config tracing.Config + func (c *TracingComponent) Init(_ context.Context, _ *App, mgr *shutdown.Manager) error + func (c *TracingComponent) Name() string + type WorkerManager struct + func NewWorkerManager(ctx context.Context) *WorkerManager + func (w *WorkerManager) AddOnce(name string, fn func(ctx context.Context)) + func (w *WorkerManager) AddTicker(name string, interval time.Duration, fn func(ctx context.Context)) + func (w *WorkerManager) Close() + func (w *WorkerManager) Wait()