startup

package
v0.0.0-...-dd4be11 Latest Latest
Warning

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

Go to latest
Published: May 4, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package startup provides a mechanism for registering and running initialization functions during application startup.

Index

Constants

This section is empty.

Variables

View Source
var ErrDeferStartup = wlerrors.New("defer startup")

ErrDeferStartup signals that a startup function should be deferred and run later.

Functions

func RegisterHook

func RegisterHook(f HookFunc)

RegisterHook adds a startup function to be executed during application initialization.

func RunStartups

func RunStartups(ctx context.Context, cnf config.Provider) error

RunStartups executes all registered startup functions in order, supporting deferral.

Types

type HookFunc

type HookFunc func(context.Context, config.Provider) error

HookFunc is a function that performs initialization tasks during application startup.

Jump to

Keyboard shortcuts

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