Documentation
¶
Overview ¶
Package runtimekit provides runtime helpers
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CallerLineInfo ¶
CallerLineInfo returns caller file:line-package.function e.g. service.go:38-service.CallAPI.
func ExecuteBackground ¶
func ExecuteBackground(fn func())
ExecuteBackground a function, and log the error when panic found. executing a background functions may cause unhandled panic by middlewares.
func FunctionName ¶
func FunctionName() string
FunctionName returns this function caller's name useful to wrap span, trace, context info e.g. trace.Start(ctx, runtimekit.FunctionName()).
func NewRuntimeContext ¶
func NewRuntimeContext() (context.Context, context.CancelFunc)
NewRuntimeContext returns context & cancel func listening to : - os.Interrupt - syscall.SIGTERM - syscall.SIGINT.
func SkippedFunctionName ¶
SkippedFunctionName returns function caller's name with skipped count.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.