store

package module
v0.0.0-...-4b376d9 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2020 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFSBlockStore

func NewFSBlockStore(path string, defaultHashAPI uint32, jobAPI lib.Longtail_JobAPI) (lib.BlockStoreAPI, error)

NewFSBlockStore ...

func NewGCSBlockStore

func NewGCSBlockStore(u *url.URL, defaultHashAPI lib.Longtail_HashAPI, maxBlockSize uint32, maxChunksPerBlock uint32) (lib.BlockStoreAPI, error)

NewGCSBlockStore ...

Types

type FileStorage

type FileStorage interface {
	ReadFromPath(ctx context.Context, path string) ([]byte, error)
	WriteToPath(ctx context.Context, path string, data []byte) error
	Close()
}

func NewFSFileStorage

func NewFSFileStorage() (FileStorage, error)

NewFSFileStorage ...

func NewGCSFileStorage

func NewGCSFileStorage(u *url.URL) (FileStorage, error)

NewGCSFileStorage ...

Jump to

Keyboard shortcuts

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