multistore

package
v0.5.6 Latest Latest
Warning

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

Go to latest
Published: May 20, 2025 License: MIT Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(stores ...store.Store) store.Store

Types

type Store

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

func (*Store) Copy added in v0.5.0

func (m *Store) Copy(ctx context.Context, srcKey, dstKey string) error

func (*Store) Delete added in v0.5.0

func (m *Store) Delete(ctx context.Context, key string) error

func (*Store) Load

func (m *Store) Load(ctx context.Context, key string) (io.ReadCloser, *store.Headers, error)

Load loads the data from the first store that doesn't return an error If all stores return an error, it returns all errors as a multierr error It is the responsibility of the caller to close the returned reader

func (*Store) Store

func (m *Store) Store(ctx context.Context, key string, reader io.Reader, headers *store.Headers) error

Store stores the data in all stores (if one store returns an error, it will continue to the next store)

Jump to

Keyboard shortcuts

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