Documentation ¶
Index ¶
- type FetcherFunc
- type Manager
- type Slot
- func (s *Slot) Delete(key interface{})
- func (s *Slot) DeleteFunc(f func(key interface{}, value interface{}) bool) int
- func (s *Slot) Get(key interface{}) (interface{}, error)
- func (s *Slot) GetCustomFetch(key interface{}, fetcher FetcherFunc) (interface{}, error)
- func (s *Slot) Name() string
- func (s *Slot) NewKey() interface{}
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FetcherFunc ¶
type FetcherFunc = func(key interface{}) (interface{}, error)
type Manager ¶
func NewManager ¶
func (*Manager) EvictSlotEntry ¶
func (*Manager) RegisterSlot ¶
func (m *Manager) RegisterSlot(name string, fetcher FetcherFunc, keyType interface{}) *Slot
RegisterSlot register a new cached "thing" this is only safe to called during init() and friends
type Slot ¶
type Slot struct {
// contains filtered or unexported fields
}
func (*Slot) DeleteFunc ¶
func (*Slot) GetCustomFetch ¶
func (s *Slot) GetCustomFetch(key interface{}, fetcher FetcherFunc) (interface{}, error)
Click to show internal directories.
Click to hide internal directories.