drive

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2015 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

directory structure

  .
  |-- repositoryName
	  |-- scratch
		  |-- shardNum // the read-only read created on InitRepository, this is where to start branching
      |-- commitID
	      |-- shardNum // this is where subvolumes are

Index

Constants

View Source
const (
	InitialCommitID = "scratch"
)

Variables

View Source
var (
	ReservedCommitIDs = map[string]bool{
		InitialCommitID: true,
	}
)

Functions

This section is empty.

Types

type Driver

type Driver interface {
	Init() error
	InitRepository(repository *pfs.Repository, shard map[int]bool) error
	GetFile(path *pfs.Path, shard int) (io.ReadCloser, error)
	MakeDirectory(path *pfs.Path, shards map[int]bool) error
	PutFile(path *pfs.Path, shard int, reader io.Reader) error
	ListFiles(path *pfs.Path, shard int) ([]*pfs.FileInfo, error)
	Branch(commit *pfs.Commit, newCommit *pfs.Commit, shards map[int]bool) (*pfs.Commit, error)
	Commit(commit *pfs.Commit, shards map[int]bool) error
	PullDiff(commit *pfs.Commit, shard int) (io.Reader, error)
	PushDiff(commit *pfs.Commit, shard int, reader io.Reader) error
	GetCommitInfo(commit *pfs.Commit, shard int) (*pfs.CommitInfo, error)
}

func NewBtrfsDriver

func NewBtrfsDriver(rootDir string, btrfsAPI btrfs.API) Driver

Jump to

Keyboard shortcuts

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