model

package
v0.0.0-...-eedcae6 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2015 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Assembler

type Assembler struct {
	Where string
	// contains filtered or unexported fields
}

func NewAssembler

func NewAssembler(m *Model) (res *Assembler, err error)

func (*Assembler) Close

func (a *Assembler) Close()

func (*Assembler) Done

func (a *Assembler) Done(what lists.BlobMap) (err error)

Assemble target files from stored chunks

func (*Assembler) StoreChunk

func (a *Assembler) StoreChunk(r io.Reader, id proto.ID) (err error)

Store chunk in assemble

func (*Assembler) StoredChunks

func (a *Assembler) StoredChunks() (res []string, err error)

type Model

type Model struct {
	WD      string
	Git     *git.Git
	FdLocks *concurrency.Locks
	*concurrency.BatchPool
	// contains filtered or unexported fields
}

func New

func New(wd string, useGit bool, chunkSize int64, pool int) (res *Model, err error)

func (*Model) Check

func (m *Model) Check(names ...string) (isDirty bool, dirty []string, err error)

Check working tree for consistency

func (*Model) Close

func (m *Model) Close()

func (*Model) FeedManifests

func (m *Model) FeedManifests(blobs, manifests, strict bool, names ...string) (res lists.BlobMap, err error)

func (*Model) GetManifest

func (m *Model) GetManifest(name string, in io.Reader) (res *proto.Manifest, err error)

Get manifest by filename or given reader

func (*Model) IsBlobs

func (m *Model) IsBlobs(names ...string) (res map[string]bool, err error)

func (*Model) ReadChunk

func (m *Model) ReadChunk(name string, chunk proto.Chunk, res []byte) (err error)

func (*Model) SquashBlobs

func (m *Model) SquashBlobs(blobs lists.BlobMap) (err error)

Jump to

Keyboard shortcuts

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