Documentation ¶
Index ¶
- func Backoff(attempt int, max time.Duration) time.Duration
- func FormatTime(t time.Time) string
- func GetIDByAddr(addr string) string
- func GetJSONValue(data interface{}, path string) (interface{}, error)
- func GetLocalIP() string
- func GetTimeLayout() string
- func IsSpace(c byte) bool
- func IsValidIPV4Address(str string) bool
- func MapLen(m *sync.Map) int
- func ParseJSON(b []byte) (interface{}, error)
- func ParseTime(str string) (time.Time, error)
- func RandomString(length int) (string, error)
- func SleepWithContext(ctx context.Context, duration time.Duration) bool
- func UntilWithContext(ctx context.Context, f func(context.Context), period time.Duration)
- func ValidateEventAttrName(attr string) error
- type Group
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatTime ¶
func GetIDByAddr ¶
func GetJSONValue ¶
func GetLocalIP ¶
func GetLocalIP() string
func GetTimeLayout ¶
func GetTimeLayout() string
func IsValidIPV4Address ¶
func RandomString ¶
func UntilWithContext ¶
func ValidateEventAttrName ¶
Types ¶
type Group ¶
type Group struct {
// contains filtered or unexported fields
}
func (*Group) Start ¶
func (g *Group) Start(f func())
Start starts f in a new goroutine in the group.
func (*Group) StartWithChannel ¶
func (g *Group) StartWithChannel(stopCh <-chan struct{}, f func(stopCh <-chan struct{}))
StartWithChannel starts f in a new goroutine in the group. stopCh is passed to f as an argument. f should stop when stopCh is available.
func (*Group) StartWithContext ¶
StartWithContext starts f in a new goroutine in the group. ctx is passed to f as an argument. f should stop when ctx.Done() is available.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.