Documentation ¶
Index ¶
- func Env() *env.Env
- func FuncWithTimeout(ctx context.Context, f func()) error
- func GetInitCallback() []func()
- func GetShutdownCallback() []func()
- func Lookup(k RegisterKey) interface{}
- func MustLookup(k RegisterKey) interface{}
- func MustLookupString(k RegisterKey) string
- func Register(k RegisterKey, v interface{})
- func RegisterBackgroundCallback(task *BackgroundTask)
- func RegisterEnv(e1 *env.Env)
- func RegisterInitCallback(callback func())
- func RegisterShutdownCallback(callback func())
- func RunBackgroundCallbacks()
- func ShuttingDown() bool
- type BackgroundTask
- type RegisterKey
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FuncWithTimeout ¶
func GetInitCallback ¶
func GetInitCallback() []func()
func GetShutdownCallback ¶
func GetShutdownCallback() []func()
func Lookup ¶
func Lookup(k RegisterKey) interface{}
func MustLookup ¶
func MustLookup(k RegisterKey) interface{}
func MustLookupString ¶
func MustLookupString(k RegisterKey) string
func Register ¶
func Register(k RegisterKey, v interface{})
Register is used to register your own key and value
func RegisterBackgroundCallback ¶
func RegisterBackgroundCallback(task *BackgroundTask)
func RegisterEnv ¶
RegisterEnv is used to register env to this register hub
func RegisterInitCallback ¶
func RegisterInitCallback(callback func())
func RegisterShutdownCallback ¶
func RegisterShutdownCallback(callback func())
func RunBackgroundCallbacks ¶
func RunBackgroundCallbacks()
func ShuttingDown ¶
func ShuttingDown() bool
Types ¶
type BackgroundTask ¶
type RegisterKey ¶
type RegisterKey string
RegisterKey is used to register custom value and retrieve back
Click to show internal directories.
Click to hide internal directories.