Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BlobStore

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

func (*BlobStore) Close

func (bs *BlobStore) Close() error

func (*BlobStore) Enumerate

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

func (*BlobStore) Get

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

func (*BlobStore) Put

func (bs *BlobStore) Put(ctx context.Context, blob *blob.Blob) (bool, error)

func (*BlobStore) Stat

func (bs *BlobStore) Stat(ctx context.Context, hash string) (bool, error)

type KvStore

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

func (*KvStore) Close

func (kv *KvStore) Close() error

func (*KvStore) Get

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

func (*KvStore) GetMetaBlob

func (kv *KvStore) GetMetaBlob(ctx context.Context, key string, version int64) (string, error)

func (*KvStore) Keys

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

func (*KvStore) Put

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

func (*KvStore) ReverseKeys

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

func (*KvStore) Versions

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

type Stash

type Stash struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func New

func New(dir string, m *meta.Meta, bs *blobstore.BlobStore, kvs *kvstore.KvStore, h *hub.Hub, l log.Logger) (*Stash, error)

func (*Stash) BlobStore

func (s *Stash) BlobStore() *BlobStore

func (*Stash) Close

func (s *Stash) Close() error

func (*Stash) ContextNames

func (s *Stash) ContextNames() []string

func (*Stash) DataContextByName

func (s *Stash) DataContextByName(name string) (*dataContext, bool)

func (*Stash) Destroy

func (s *Stash) Destroy(ctx context.Context, name string) error

func (*Stash) DoAndDestroy

func (s *Stash) DoAndDestroy(ctx context.Context, name string, do func(context.Context, store.DataContext) error) error

func (*Stash) KvStore

func (s *Stash) KvStore() *KvStore

func (*Stash) MergeAndDestroy

func (s *Stash) MergeAndDestroy(ctx context.Context, name string) error

func (*Stash) MergeFileTreeVersionAndDestroy

func (s *Stash) MergeFileTreeVersionAndDestroy(ctx context.Context, name string, key string, version int64) error

func (*Stash) NewDataContext

func (s *Stash) NewDataContext(name string) (*dataContext, error)

func (*Stash) Root

func (s *Stash) Root() store.DataContext

Source Files

Directories

Path Synopsis