store

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrorFsCommitConflict indicates concurrent writing file
	ErrorFsCommitConflict = errors.New("conflict on fs commit")
)

Functions

This section is empty.

Types

type FsTxn

type FsTxn interface {
	Write(filename string, reader io.Reader) error
	Read(filename string) (io.ReadCloser, error)
	WriteManifest(filename string, manifest *v1manifest.Manifest) error
	ReadManifest(filename string, role v1manifest.ValidManifest) (*v1manifest.Manifest, error)
	Stat(filename string) (os.FileInfo, error)
	// ResetManifest should reset the manifest state
	ResetManifest() error
	Commit() error
	Rollback() error
}

FsTxn represent the transaction session of file operations

type Store

type Store interface {
	Begin() (FsTxn, error)
}

Store represents the storage level

func New

func New(root string, upstream string) Store

New returns a Store, curretly only qcloud supported

type Syncer

type Syncer interface {
	Sync(srcDir string) error
}

Syncer sync diff files to target

Jump to

Keyboard shortcuts

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