fxutil

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InvokeIf

func InvokeIf(cond bool, function interface{}) fx.Option

InvokeIf invokes a given function if a condition is met.

func ProvideAs

func ProvideAs(prv interface{}, as ...interface{}) fx.Option

ProvideAs provides the first argument as types of the second.

func ProvideIf

func ProvideIf(cond bool, ctor ...interface{}) fx.Option

ProvideIf provides a given constructor if a condition is met.

func SupplyIf

func SupplyIf(cond bool, val ...interface{}) fx.Option

SupplyIf supplies DI if a condition is met.

func WithLifecycle

func WithLifecycle(ctx context.Context, lc fx.Lifecycle) context.Context

WithLifecycle wraps a context to be canceled when the lifecycle stops.

Types

This section is empty.

Jump to

Keyboard shortcuts

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