Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service interface {
//Put write key to cache
Put(ctx context.Context, key string, data []byte, ttl time.Duration) error
//Get cache value
Get(ctx context.Context, key string) ([]byte, error)
//Remove cache for supplied key
Delete(ctx context.Context, key string) error
}
Service represents generic cache service
type ServiceRegistry ¶
type ServiceRegistry interface {
//Register registers service
Register(name string, service Service)
//Get returns service
Get(name string) (Service, error)
//Remove removes service
Remove(name string)
//Returns register cache services
Keys() []string
}
ServiceRegistry represents cache registry
Click to show internal directories.
Click to hide internal directories.