Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrLRUCacheError = errors.New("Error getting value from cache ")
View Source
var ErrLRUCacheValue = errors.New("Unkown value was found ")
Functions ¶
This section is empty.
Types ¶
type Endpoint ¶
type Endpoint interface { Save(url *models.URL) error Get(baseURL string) (*models.URL, error) Delete(baseURL string) error Resolve(ctx echo.Context) error Dump(ctx echo.Context) error }
func NewURLEndpoint ¶
func NewURLEndpoint(store *URLCacheStore) Endpoint
type URLCacheStore ¶
type URLCacheStore struct {
// contains filtered or unexported fields
}
func NewURLCacheStore ¶
func NewURLCacheStore(size, maxAge int, conn connector.Connector, path string, manager metrics.MetricManager) (*URLCacheStore, error)
func (*URLCacheStore) Dump ¶
func (ucs *URLCacheStore) Dump() (int, error)
evicts all LRU cache to Disk
func (*URLCacheStore) Size ¶
func (ucs *URLCacheStore) Size() int
func (*URLCacheStore) Start ¶
func (ucs *URLCacheStore) Start() error
Click to show internal directories.
Click to hide internal directories.