cube

package
v0.0.0-...-2337eca Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2017 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cube

type Cube struct {
	Id          string               `json:"id"`
	TrayId      string               `json:"tray_id"`
	CreatedAt   time.Time            `json:"created_at"`
	Hash        string               `json:"hash"`
	AWSLocation string               `json:"aws_location"`
	UploadedAt  time.Time            `json:"uploaded_at"`
	ParentId    string               `json:"parent_id"`
	ChildId     string               `json:"child_id"`
	Parent      *Cube                `json:"-"`
	Child       *Cube                `json:"-"`
	Molecules   []*molecule.Molecule `json:"-"`
	Size        int64                `json:"size"`
	// contains filtered or unexported fields
}

Cubes are the actual files that get uploaded to Glacier. These contain entire or parts of backed up files.

func New

func New(size int64, backupdir string) (*Cube, error)

Create a new cube isntance.

func Open

func Open(name string) (*Cube, error)

Create a cube instance from backing store file.

func (*Cube) Close

func (c *Cube) Close() error

Close and finalize the cube.

func (*Cube) Freeze

func (c *Cube) Freeze() error

Freeze the current cube.

func (*Cube) IsFull

func (c *Cube) IsFull() bool

Check if the cube has reached the max size.

func (*Cube) Next

func (c *Cube) Next() (*Cube, error)

Create and return the next cube instance when this one is full.

func (*Cube) WriteMolecule

func (c *Cube) WriteMolecule(m *molecule.Molecule) (n int, err error)

Write a molecule to the cube backing store.

Jump to

Keyboard shortcuts

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