Documentation
¶
Index ¶
- func ContextWithComponentPaths(ctx context.Context, paths ComponentPaths) context.Context
- func ContextWithFailFast(ctx context.Context, failFast bool) context.Context
- func ContextWithHops(ctx context.Context, hops Hops) context.Context
- func ContextWithParallelism(ctx context.Context, limit int) context.Context
- func ContextWithViper(ctx context.Context, v *viper.Viper) context.Context
- func FailFastFromContext(ctx context.Context) bool
- func Logger(ctx context.Context, args ...any) *slog.Logger
- func NewViper() *viper.Viper
- func ParallelismFromContext(ctx context.Context) int
- func ParallelismLimit(limit int) int
- func Viper(ctx context.Context) *viper.Viper
- type ComponentPaths
- type Hops
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContextWithComponentPaths ¶
func ContextWithComponentPaths(ctx context.Context, paths ComponentPaths) context.Context
ContextWithComponentPaths returns a context with component paths for filtering
func ContextWithFailFast ¶
ContextWithFailFast returns a context with fail-fast behavior enabled/disabled
func ContextWithHops ¶
ContextWithHops returns a context with hops for loop detection
func ContextWithParallelism ¶
ContextWithParallelism returns a context with parallelism limit set
func ContextWithViper ¶ added in v0.7.0
ContextWithViper returns a context with viper instance stored
func FailFastFromContext ¶
FailFastFromContext returns the fail-fast setting from context
func NewViper ¶ added in v0.7.0
NewViper creates an owned viper instance with :: delimiter. The :: delimiter allows dots in component names (e.g., google.com).
func ParallelismFromContext ¶
ParallelismFromContext returns the parallelism limit from context (default 0 = GOMAXPROCS)
func ParallelismLimit ¶
ParallelismLimit converts the parallelism setting to an actual limit value. Returns -1 for unlimited (don't call SetLimit), or a positive number.
Types ¶
type ComponentPaths ¶
type ComponentPaths [][]string // Each path like ["system", "subcomponent"]
ComponentPaths represents hierarchical component paths for filtering health checks
func ComponentPathsFromContext ¶
func ComponentPathsFromContext(ctx context.Context) ComponentPaths
ComponentPathsFromContext returns the component paths from context