localfs

package
v0.0.11 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2021 License: GPL-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package localfs contains logic implementing interfaces for local FS

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ObjectLocalFsStore

type ObjectLocalFsStore struct {
	blobs.ObjectStore
	// contains filtered or unexported fields
}

ObjectLocalFsStore implementation of ObjectRepo interface for local store

func NewLocalFsBlobStore

func NewLocalFsBlobStore(root string, log logger.Logger) (*ObjectLocalFsStore, error)

NewLocalFsBlobStore creates ObjectLocalFsStore object

func (*ObjectLocalFsStore) Exists

func (store *ObjectLocalFsStore) Exists(ctx context.Context, ns data.Namespace, id data.ObjectID) (bool, error)

Exists checks if object exist on local storage

func (*ObjectLocalFsStore) ReadFull

func (store *ObjectLocalFsStore) ReadFull(ctx context.Context, ns data.Namespace, id data.ObjectID, writer io.Writer) error

ReadFull read the whole file into memory and return content

func (*ObjectLocalFsStore) StoreStream

func (store *ObjectLocalFsStore) StoreStream(ctx context.Context, ns data.Namespace, id data.ObjectID, reader io.Reader) (int64, error)

StoreStream persist Object in local path

Jump to

Keyboard shortcuts

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