Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Expirable ¶
type Expirable struct {
// contains filtered or unexported fields
}
Expirable in-memory variable Its value is an interface{} that is refreshed every {ttl} with the given refresher
func NewExpirable ¶
func NewExpirable(refresher ExpirableRefresher, TTL time.Duration) *Expirable
NewExpirable creates a new Expirable variable with the given Refresher & TTL
type ExpirableRefresher ¶
type ExpirableRefresher func() interface{}
ExpirableRefresher is the function that is called each refresh of the Expirable Variable
Click to show internal directories.
Click to hide internal directories.