Documentation ¶
Index ¶
- func NewTimeCache[T any](expire time.Duration, getter func() (T, error)) *timeCache[T]
- type RenewableContext
- func (rc *RenewableContext) Cancel()
- func (*RenewableContext) Deadline() (deadline time.Time, ok bool)
- func (rc *RenewableContext) Done() <-chan struct{}
- func (rc *RenewableContext) Err() error
- func (rc *RenewableContext) Renew(timeout time.Duration)
- func (rc *RenewableContext) Value(key interface{}) interface{}
- type SliceRing
- type TimeCache
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type RenewableContext ¶
type RenewableContext struct {
// contains filtered or unexported fields
}
func CtxWithRenewableTimeout ¶ added in v0.2.13
func CtxWithRenewableTimeout(parent context.Context, timeout time.Duration) (*RenewableContext, context.CancelFunc)
func (*RenewableContext) Cancel ¶
func (rc *RenewableContext) Cancel()
func (*RenewableContext) Deadline ¶ added in v0.2.13
func (*RenewableContext) Deadline() (deadline time.Time, ok bool)
func (*RenewableContext) Done ¶
func (rc *RenewableContext) Done() <-chan struct{}
func (*RenewableContext) Err ¶
func (rc *RenewableContext) Err() error
func (*RenewableContext) Renew ¶
func (rc *RenewableContext) Renew(timeout time.Duration)
func (*RenewableContext) Value ¶
func (rc *RenewableContext) Value(key interface{}) interface{}
type SliceRing ¶ added in v0.2.17
type SliceRing[T any] struct { // contains filtered or unexported fields }
func NewSliceRing ¶ added in v0.2.17
Click to show internal directories.
Click to hide internal directories.