Documentation ¶
Index ¶
- func GetIP() string
- func LogPanic(logger errorable)
- 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 ScheduleWithInitialDelay ¶ added in v0.0.10
func UUIDString ¶
func UUIDString() string
Types ¶
type ErrorCounter ¶ added in v0.1.1
type ErrorCounter struct {
// contains filtered or unexported fields
}
일정 시간 (duration) 동안 일정 건수 (threshold) 이상의 err 발생 여부 카운팅
func NewErrorCounter ¶ added in v0.1.1
func NewErrorCounter(duration time.Duration, threshold int) *ErrorCounter
func (*ErrorCounter) Err ¶ added in v0.1.1
func (c *ErrorCounter) Err() error
func (*ErrorCounter) IsOverThreshold ¶ added in v0.1.1
func (c *ErrorCounter) IsOverThreshold() bool
func (*ErrorCounter) Put ¶ added in v0.1.1
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.