Versions in this module Expand all Collapse all v0 v0.4.5 Apr 10, 2021 v0.4.4 Apr 10, 2021 Changes in this version + func GetGroupCachePool() *groupcache.HTTPPool + func InitGroupCacheRes(maxSize int) error + func InitRedisClient(addr, password string, db int) error + func NewNoPreCollectError(msg string) error + func ParseRedisConfig(connSetting string) (*redis.Options, error) + func ReleaseGroupCacheRes() error + type Backend interface + Clean func() error + Flush func() error + GetReader func() (io.ReadCloser, error) + Length func() int + func NewFileBackend(path string) (Backend, error) + func NewInMemoryBackend(ctx context.Context, key string, expiration time.Time) (Backend, error) + func NewRedisBackend(ctx context.Context, key string, expiration time.Time) (Backend, error) + func WrapResponseWriterToBackend(w http.ResponseWriter) Backend + type Base struct + func (b *Base) Clean() error + func (b *Base) Close() error + func (b *Base) Flush() error + func (b *Base) GetReader() (io.ReadCloser, error) + func (b *Base) Length() int + func (b *Base) Write(p []byte) (n int, err error) + type FileBackend struct + func (f *FileBackend) Clean() error + func (f *FileBackend) Close() error + func (f *FileBackend) Flush() error + func (f *FileBackend) GetReader() (io.ReadCloser, error) + func (f *FileBackend) Length() int + func (f *FileBackend) Write(p []byte) (n int, err error) + type FileReader struct + func (r *FileReader) Close() error + func (r *FileReader) Read(p []byte) (n int, err error) + type InMemoryBackend struct + Ctx context.Context + Key string + func (i *InMemoryBackend) Clean() error + func (i *InMemoryBackend) Close() error + func (i *InMemoryBackend) Flush() error + func (i *InMemoryBackend) GetReader() (io.ReadCloser, error) + func (i *InMemoryBackend) Length() int + func (i *InMemoryBackend) Write(p []byte) (n int, err error) + type NoPreCollectError struct + Content string + func (e NoPreCollectError) Error() string + type RedisBackend struct + Ctx context.Context + Key string + func (r *RedisBackend) Clean() error + func (r *RedisBackend) Close() error + func (r *RedisBackend) Flush() error + func (r *RedisBackend) GetReader() (io.ReadCloser, error) + func (r *RedisBackend) Length() int + func (r *RedisBackend) Write(p []byte) (n int, err error) + type Subscription struct + func NewSubscription() *Subscription + func (s *Subscription) Close() + func (s *Subscription) NewSubscriber() <-chan int + func (s *Subscription) NotifyAll(newBytes int) + func (s *Subscription) RemoveSubscriber(subscriber <-chan int) + func (s *Subscription) WaitAll()