Documentation ¶
Index ¶
Constants ¶
View Source
const ( // Request and connect timeout DefaultTimeout = time.Second * 30 )
Variables ¶
View Source
var (
ErrTooBusy = errors.New("conn pool too busy")
)
Functions ¶
This section is empty.
Types ¶
type CacheManager ¶
type CacheManager struct {
// contains filtered or unexported fields
}
func NewCacheManager ¶
func NewCacheManager(server string, maxOpen int) *CacheManager
func (*CacheManager) Get ¶
func (m *CacheManager) Get(key Key, tp NewableFromBytes, expire time.Duration, generate GenerateFunc) (Cacheable, error)
type Cacheable ¶
type Cacheable interface { NewableFromBytes EncodeToBytes() ([]byte, error) }
type GenerateFunc ¶
type NewableFromBytes ¶
Click to show internal directories.
Click to hide internal directories.