Documentation
¶
Index ¶
- func CheckPanic()
- func GetCallerFuncName(seps ...rune) string
- func GetCurrentFuncName(seps ...rune) string
- func GetFunctionName(i interface{}, seps ...rune) string
- func InvokeFunc(fn interface{}, args ...interface{}) interface{}
- func InvokeTicker(interval time.Duration, runRightNow bool, name string, fn interface{}, ...)
- func InvokeTickerEx(interval time.Duration, deadline time.Time, stop <-chan bool, runRightNow bool, ...)
- type FuncContext
- type FuncContextMap
- func (rm *FuncContextMap) InvokeFunc(name string, fn interface{}, args ...interface{}) interface{}
- func (rm *FuncContextMap) InvokeFuncWithTimeout(timeout time.Duration, name string, fn interface{}, args ...interface{}) interface{}
- func (rm *FuncContextMap) StartTicker(interval time.Duration, runRightNow bool, name string, fn interface{}, ...)
- func (rm *FuncContextMap) StartTickerWithDeadline(interval time.Duration, deadline time.Time, runRightNow bool, name string, ...)
- func (rm *FuncContextMap) StopFunc(name string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetFunctionName ¶
GetFunctionName 获取函数名称
func InvokeFunc ¶
func InvokeFunc(fn interface{}, args ...interface{}) interface{}
InvokeFunc 调用函数:fn要调用的方法;args方法参数
Types ¶
type FuncContext ¶
type FuncContext struct {
// contains filtered or unexported fields
}
FuncContext context of function
type FuncContextMap ¶
type FuncContextMap struct {
// contains filtered or unexported fields
}
FuncContextMap map for FuncContext
func NewFuncContextMap ¶
func NewFuncContextMap() *FuncContextMap
NewFuncContextMap returns new instance of FuncContextMap
func (*FuncContextMap) InvokeFunc ¶
func (rm *FuncContextMap) InvokeFunc(name string, fn interface{}, args ...interface{}) interface{}
InvokeFunc 调用函数:name方法名称;fn要调用的方法;args方法参数
func (*FuncContextMap) InvokeFuncWithTimeout ¶
func (rm *FuncContextMap) InvokeFuncWithTimeout(timeout time.Duration, name string, fn interface{}, args ...interface{}) interface{}
InvokeFuncWithTimeout 调用函数:timeout超时时间;name方法名称;fn要调用的方法;args方法参数
func (*FuncContextMap) StartTicker ¶
func (rm *FuncContextMap) StartTicker(interval time.Duration, runRightNow bool, name string, fn interface{}, args ...interface{})
StartTicker 定时执行任务:interval时间间隔;runRightNow是否执行一次;name方法名称;fn要调用的方法;args方法参数
func (*FuncContextMap) StartTickerWithDeadline ¶
func (rm *FuncContextMap) StartTickerWithDeadline(interval time.Duration, deadline time.Time, runRightNow bool, name string, fn interface{}, args ...interface{})
StartTickerWithDeadline 定时执行任务:interval时间间隔;deadline过期时间;runRightNow是否执行一次;name方法名称;fn要调用的方法;args方法参数
func (*FuncContextMap) StopFunc ¶
func (rm *FuncContextMap) StopFunc(name string)
StopFunc 停止routine:name方法名称
Click to show internal directories.
Click to hide internal directories.