Documentation
¶
Index ¶
- func HttpHeaderDate(headers http.Header, key string) (time.Time, stackerr.Error)
- func TimeFromUnix[T constraints.Integer](unix T) time.Time
- func Waiter(ctx context.Context, duration time.Duration, closeOnCtxDone bool) <-chan struct{}
- func WaiterWithCallback(ctx context.Context, duration time.Duration, closeOnCtxDone bool, ...) <-chan struct{}
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HttpHeaderDate ¶
HttpHeaderDate gets a time.Time from a given header key in the given header object.
func TimeFromUnix ¶
func TimeFromUnix[T constraints.Integer](unix T) time.Time
TimeFromUnix will parse a Unix timestamp that can be in seconds, milliseconds, microseconds, or nanoseconds.
func Waiter ¶
Waiter will return a channel that will close after the specified duration. If the context is cancelled, the channel will never close.
func WaiterWithCallback ¶
func WaiterWithCallback(ctx context.Context, duration time.Duration, closeOnCtxDone bool, callback func(ctx context.Context)) <-chan struct{}
WaiterWithCallback will return a channel that will close after the specified duration. If the context is cancelled, the channel will never close.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.