Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CombinedStorage ¶
func (*CombinedStorage) Delete ¶
func (s *CombinedStorage) Delete(key interface{})
func (*CombinedStorage) Fetch ¶
func (s *CombinedStorage) Fetch(key interface{}) (value interface{})
func (*CombinedStorage) Flush ¶
func (s *CombinedStorage) Flush()
func (*CombinedStorage) Store ¶
func (s *CombinedStorage) Store(key, value interface{})
type LoaderFunc ¶
type LoaderFunc func(interface{}) (interface{}, error)
type Manager ¶
type Manager struct {
DB *bolt.DB
Size int
L logging.Logger
// contains filtered or unexported fields
}
func (*Manager) NewMemo ¶
func (m *Manager) NewMemo(name string, sample interface{}, l LoaderFunc) Memo
func (*Manager) NewStorage ¶
type SingleFlight ¶
type SingleFlight struct {
// contains filtered or unexported fields
}
func NewSingleFlight ¶
func NewSingleFlight() *SingleFlight
func (*SingleFlight) Do ¶
func (f *SingleFlight) Do(key interface{}, fn func(interface{}) (interface{}, bool)) <-chan interface{}
type Storage ¶
type Storage interface {
Store(key, value interface{})
Fetch(key interface{}) interface{}
Delete(key interface{})
}
func NewBoltDBStorage ¶
func NewMapStorage ¶
func NewMapStorage() Storage
Click to show internal directories.
Click to hide internal directories.