Documentation ¶
Index ¶
Constants ¶
View Source
const DATA_PLACE_HOLE = "_DATA_PLACE_HOLE_"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RotateLog ¶ added in v1.0.7
type RotateLog struct {
// contains filtered or unexported fields
}
func NewRotateLog ¶ added in v1.0.7
*
- 获取 RotateLog 新实例 *
- @param logDir 日志存放目录, 带不带结尾的目录根号都行, 正反根号也都行
- @param fileTpl 文件名模板, 字符串中常量 DATA_PLACE_HOLE 为日期的位置, 会被替换成当前日期, 例如 runtime-_DATA_PLACE_HOLE_.log * *
func (*RotateLog) SetBackupDir ¶ added in v1.0.7
type Runner ¶
type Runner struct {
Runnable bool
}
func (*Runner) Exec ¶ added in v1.0.5
func (_this *Runner) Exec(runnerFunc RunnerFunc) *Runner
func (*Runner) Failed ¶ added in v1.0.5
func (_this *Runner) Failed(runnerFunc RunnerFinishFunc) *Runner
func (*Runner) IsRunnable ¶
func (*Runner) Success ¶ added in v1.0.5
func (_this *Runner) Success(runnerFunc RunnerFinishFunc) *Runner
type RunnerFinishFunc ¶
type RunnerFinishFunc func()
type RunnerFunc ¶
type RunnerFunc func() bool
type SpinLock ¶ added in v1.0.4
type SpinLock struct {
// contains filtered or unexported fields
}
SpinLock implements a simple atomic spin lock, the zero value for a SpinLock is an unlocked spinlock.
func (*SpinLock) Lock ¶ added in v1.0.4
func (sl *SpinLock) Lock()
Lock locks sl. If the lock is already in use, the caller blocks until Unlock is called
func (*SpinLock) TryLock ¶ added in v1.0.4
TryLock will try to lock sl and return whether it succeed or not without blocking.
func (*SpinLock) Unlock ¶ added in v1.0.4
func (sl *SpinLock) Unlock()
Unlock unlocks sl, unlike [Mutex.Unlock](http://golang.org/pkg/sync/#Mutex.Unlock), there's no harm calling it on an unlocked SpinLock
Click to show internal directories.
Click to hide internal directories.