Documentation ¶
Index ¶
- func Configuration() *conf.Configuration
- func InitBuffWriteSyncer(opts ...zap.Option) *logtest.Buffer
- func InitGlobalLogger(disableStacktrace bool)
- func RunWait(log func(args ...any), timeout time.Duration, fns ...func() error) error
- func RunWaitDone(timeout time.Duration, fns ...func() error) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Configuration ¶
func Configuration() *conf.Configuration
Configuration returns a testdata configuration for test.
func InitBuffWriteSyncer ¶
InitBuffWriteSyncer returns a Memory WriteSyncer for log test
func InitGlobalLogger ¶
func InitGlobalLogger(disableStacktrace bool)
InitGlobalLogger sets a sample logger as the global logger for pkg log test.
func RunWait ¶
RunWait runs some long time task functions for given duration to start, and the tasks keep running after timeout. log is a function to log error message.
func RunWaitDone ¶ added in v0.5.0
RunWaitDone runs the given functions thought goroutine and waits for a time. If all tasks done, return nil error. if task return error,Run will return context.Canceled error immediately. you should handle the error in the task.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.