Documentation
¶
Index ¶
Constants ¶
View Source
const CacheGetPath = "/{any:*}"
CacheGetPath for getting pagedata from cache via HTTP.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CacheController ¶
type CacheController struct {
// contains filtered or unexported fields
}
CacheController handles cache API requests (read/write-through, error reporting, metrics).
func NewCacheController ¶
func NewCacheController( ctx context.Context, cfg *config.Config, cache storage.Storage, backend repository.Backender, ) *CacheController
NewCacheController builds a cache API controller with all dependencies. If debug is enabled, launches internal stats logger goroutine.
func (*CacheController) AddRoute ¶
func (c *CacheController) AddRoute(router *router.Router)
AddRoute attaches controller's route(s) to the provided router.
func (*CacheController) Index ¶
func (c *CacheController) Index(r *fasthttp.RequestCtx)
Index is the main HTTP handler for /api/v1/cache.
Click to show internal directories.
Click to hide internal directories.