Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Middleware ¶
func Middleware(cache ICache, skipper middleware.Skipper) echo.MiddlewareFunc
Types ¶
type CacheEntry ¶
func (*CacheEntry) Decode ¶
func (c *CacheEntry) Decode(b []byte) error
func (*CacheEntry) Encode ¶
func (c *CacheEntry) Encode() ([]byte, error)
func (*CacheEntry) Replay ¶
func (c *CacheEntry) Replay(w http.ResponseWriter) error
type CacheMiddleware ¶
type CacheMiddleware struct {
// contains filtered or unexported fields
}
func (*CacheMiddleware) Handler ¶
func (m *CacheMiddleware) Handler(next echo.HandlerFunc) echo.HandlerFunc
type ObservableCache ¶ added in v1.9.1
type ObservableCache struct {
// contains filtered or unexported fields
}
func NewObservableCache ¶ added in v1.9.1
func NewObservableCache(cfg Config, observer *bus.Observer) *ObservableCache
func (*ObservableCache) Clear ¶ added in v1.9.1
func (c *ObservableCache) Clear()
func (*ObservableCache) Close ¶ added in v1.9.1
func (c *ObservableCache) Close() error
func (*ObservableCache) Get ¶ added in v1.9.1
func (c *ObservableCache) Get(key string) ([]byte, bool)
func (*ObservableCache) Set ¶ added in v1.9.1
func (c *ObservableCache) Set(key string, data []byte)
func (*ObservableCache) Start ¶ added in v1.9.1
func (c *ObservableCache) Start(ctx context.Context)
type ResponseRecorder ¶
type ResponseRecorder struct { http.ResponseWriter // contains filtered or unexported fields }
func NewResponseRecorder ¶
func NewResponseRecorder(w http.ResponseWriter) *ResponseRecorder
func (*ResponseRecorder) Result ¶
func (r *ResponseRecorder) Result() *CacheEntry
func (*ResponseRecorder) WriteHeader ¶
func (w *ResponseRecorder) WriteHeader(statusCode int)
Click to show internal directories.
Click to hide internal directories.