store

package
v0.0.0-...-b178995 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BlobStore

type BlobStore interface {
	Put(ctx context.Context, blob *blob.Blob) (bool, error)
	Get(ctx context.Context, hash string) ([]byte, error)
	Stat(ctx context.Context, hash string) (bool, error)
	Enumerate(ctx context.Context, start, end string, limit int) ([]*blob.SizedBlobRef, string, error)
	Close() error
}

type BlobStoreProxy

type BlobStoreProxy struct {
	BlobStore
	ReadSrc BlobStore
}

func (*BlobStoreProxy) Enumerate

func (p *BlobStoreProxy) Enumerate(ctx context.Context, start, end string, limit int) ([]*blob.SizedBlobRef, string, error)

func (*BlobStoreProxy) Get

func (p *BlobStoreProxy) Get(ctx context.Context, hash string) ([]byte, error)

func (*BlobStoreProxy) Put

func (p *BlobStoreProxy) Put(ctx context.Context, blob *blob.Blob) (bool, error)

func (*BlobStoreProxy) Stat

func (p *BlobStoreProxy) Stat(ctx context.Context, hash string) (bool, error)

type DataContext

type DataContext interface {
	StashBlobStore() BlobStore
	BlobStore() BlobStore
	KvStore() KvStore
	BlobStoreProxy() BlobStore
	KvStoreProxy() KvStore
	Merge(context.Context) error
	Close() error
	Closed() bool
	Destroy() error
}

type KvStore

type KvStore interface {
	Put(ctx context.Context, key, ref string, data []byte, version int64) (*vkv.KeyValue, error)
	Get(ctx context.Context, key string, version int64) (*vkv.KeyValue, error)
	GetMetaBlob(ctx context.Context, key string, version int64) (string, error)
	Versions(ctx context.Context, key, start string, limit int) (*vkv.KeyValueVersions, string, error)
	Keys(ctx context.Context, start, end string, limit int) ([]*vkv.KeyValue, string, error)
	ReverseKeys(ctx context.Context, start, end string, limit int) ([]*vkv.KeyValue, string, error)
	Close() error
}

type KvStoreProxy

type KvStoreProxy struct {
	KvStore
	ReadSrc KvStore
}

func (*KvStoreProxy) Get

func (p *KvStoreProxy) Get(ctx context.Context, key string, version int64) (*vkv.KeyValue, error)

func (*KvStoreProxy) GetMetaBlob

func (p *KvStoreProxy) GetMetaBlob(ctx context.Context, key string, version int64) (string, error)

func (*KvStoreProxy) Keys

func (p *KvStoreProxy) Keys(ctx context.Context, start, end string, limit int) ([]*vkv.KeyValue, string, error)

func (*KvStoreProxy) Put

func (p *KvStoreProxy) Put(ctx context.Context, key, ref string, data []byte, version int64) (*vkv.KeyValue, error)

func (*KvStoreProxy) ReverseKeys

func (p *KvStoreProxy) ReverseKeys(ctx context.Context, start, end string, limit int) ([]*vkv.KeyValue, string, error)

func (*KvStoreProxy) Versions

func (p *KvStoreProxy) Versions(ctx context.Context, key, start string, limit int) (*vkv.KeyValueVersions, string, error)

Jump to

Keyboard shortcuts

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