Documentation
¶
Index ¶
- type MemoryCache
- func (m *MemoryCache) Contains(ctx context.Context, key string) (bool, error)
- func (m *MemoryCache) ContainsMulti(ctx context.Context, keys []string) (map[string]bool, error)
- func (m *MemoryCache) Delete(ctx context.Context, key string) error
- func (m *MemoryCache) Get(ctx context.Context, key string) ([]byte, error)
- func (m *MemoryCache) PrefixKey(ctx context.Context, key string) (string, error)
- func (m *MemoryCache) Reader(ctx context.Context, key string, offset, length int64) (io.Reader, error)
- func (m *MemoryCache) Set(ctx context.Context, key string, data []byte) error
- func (m *MemoryCache) Start() error
- func (m *MemoryCache) Stop() error
- func (m *MemoryCache) Writer(ctx context.Context, key string) (io.WriteCloser, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MemoryCache ¶
type MemoryCache struct {
// contains filtered or unexported fields
}
func NewMemoryCache ¶
func NewMemoryCache(maxSizeBytes int64) (*MemoryCache, error)
func (*MemoryCache) ContainsMulti ¶
func (*MemoryCache) Reader ¶
func (m *MemoryCache) Reader(ctx context.Context, key string, offset, length int64) (io.Reader, error)
Low level interface used for seeking and stream-writing.
func (*MemoryCache) Start ¶
func (m *MemoryCache) Start() error
func (*MemoryCache) Stop ¶
func (m *MemoryCache) Stop() error
func (*MemoryCache) Writer ¶
func (m *MemoryCache) Writer(ctx context.Context, key string) (io.WriteCloser, error)
Click to show internal directories.
Click to hide internal directories.