storage

package
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 24, 2020 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package storage contains built-in implementations of the cachebox.Storage interface.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MultiStorage

type MultiStorage struct {
	// contains filtered or unexported fields
}

MultiStorage implements the cachebox.Storage interface by wrapping a list of storages.

func NewMultiStorage

func NewMultiStorage(storages ...cachebox.Storage) *MultiStorage

NewMultiStorage returns a new MultiStorage instance.

func (*MultiStorage) Delete

func (m *MultiStorage) Delete(ctx context.Context, keys ...string) error

Delete performs a delete call in all underlying cache storages.

Returns early an error whether any of them fail.

func (*MultiStorage) MGet

func (m *MultiStorage) MGet(ctx context.Context, keys ...string) ([][]byte, error)

MGet performs a get multi call in the underlying cache storages.

Returns early an error whether any of them fail.

func (*MultiStorage) Set

func (m *MultiStorage) Set(ctx context.Context, items ...cachebox.Item) error

Set performs a set call in all underlying cache storages.

Returns early an error whether any of them fail.

Directories

Path Synopsis
Package memcached implements memcached adapters of the cachebox.Storage interface.
Package memcached implements memcached adapters of the cachebox.Storage interface.
Package redis implements redis adapters of the cachebox.Storage interface.
Package redis implements redis adapters of the cachebox.Storage interface.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL