Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type InterfaceCache ¶
type InterfaceCache struct {
// contains filtered or unexported fields
}
func NewInterfaceCache ¶
func NewInterfaceCache() (ic *InterfaceCache)
InterfaceCache allows for easy reuse of a specific interface value for a specified duration of time. Does not reset the lastRequest when a new request is made.
func (*InterfaceCache) Result ¶
func (ic *InterfaceCache) Result(dur time.Duration, getter func() interface{}) (res interface{})
Click to show internal directories.
Click to hide internal directories.