Documentation ¶
Index ¶
- type BasicController
- func (c BasicController) DeleteCacheByPath(paths []model.CachePath) error
- func (c BasicController) DeleteCacheByTags(tags []string) error
- func (c BasicController) GetCache(r *http.Request, service model.Service) (model.Cache, error)
- func (c BasicController) HandleResponse(r *http.Response, service model.Service) error
- func (c BasicController) IsCacheableRequest(r *http.Request) bool
- func (c BasicController) ListenResponses(ctx context.Context)
- type Controller
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BasicController ¶
type BasicController struct {
// contains filtered or unexported fields
}
func (BasicController) DeleteCacheByPath ¶
func (c BasicController) DeleteCacheByPath(paths []model.CachePath) error
DeleteCacheByPath deletes cache defined by its path
func (BasicController) DeleteCacheByTags ¶
func (c BasicController) DeleteCacheByTags(tags []string) error
DeleteCacheByTags deletes cache with tags
func (BasicController) HandleResponse ¶
HandleResponse handles a response ans sends it to the channel
func (BasicController) IsCacheableRequest ¶
func (c BasicController) IsCacheableRequest(r *http.Request) bool
IsCacheableRequest determines if a request's response can be retrieved from cache
func (BasicController) ListenResponses ¶
func (c BasicController) ListenResponses(ctx context.Context)
ListenResponses starts listening for responses
type Controller ¶
type Controller interface { IsCacheableRequest(r *http.Request) bool GetCache(r *http.Request, service model.Service) (model.Cache, error) DeleteCacheByPath(paths []model.CachePath) error DeleteCacheByTags(tags []string) error ListenResponses(ctx context.Context) HandleResponse(r *http.Response, service model.Service) error }
func NewController ¶
func NewController( cacheRepo repository.CacheRepo, logger log.Logger, ) Controller
Click to show internal directories.
Click to hide internal directories.