Documentation
¶
Index ¶
- func EnsureDirExist(dirPath string)
- func GetIP() string
- func OnPanic(fn func(msg string))
- func Retry(retryCount int) *retryer
- func Schedule(ctx context.Context, period time.Duration, fn func())
- func ScheduleWithInitialDelay(ctx context.Context, period, initialDelay time.Duration, fn func())
- func UUID() uuid.UUID
- func UUIDString() string
- type ErrorCounter
- type ExpirableOnce
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EnsureDirExist ¶ added in v0.1.13
func EnsureDirExist(dirPath string)
func UUIDString ¶
func UUIDString() string
Types ¶
type ErrorCounter ¶
type ErrorCounter struct {
// contains filtered or unexported fields
}
일정 시간 (duration) 동안 일정 건수 (threshold) 이상의 err 발생 여부 카운팅
func NewErrorCounter ¶
func NewErrorCounter(duration time.Duration, threshold int) *ErrorCounter
func (*ErrorCounter) Err ¶
func (c *ErrorCounter) Err() error
func (*ErrorCounter) IsOverThreshold ¶
func (c *ErrorCounter) IsOverThreshold() bool
func (*ErrorCounter) Put ¶
func (c *ErrorCounter) Put(err error)
type ExpirableOnce ¶
type ExpirableOnce struct {
// contains filtered or unexported fields
}
func (*ExpirableOnce) Do ¶
func (o *ExpirableOnce) Do(f func())
func (*ExpirableOnce) Expire ¶
func (o *ExpirableOnce) Expire()
Click to show internal directories.
Click to hide internal directories.