dex

package
v0.5.3 Latest Latest
Warning

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

Go to latest
Published: May 16, 2014 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Dex provides a mechanism for storing filesystem images of the kind used by docker, using git as a datastore/deduplication/history/transport system.

Git is used fairly directly and naturally by dex, so it remains very possible to use normal tools to both inspect and modifying the repository:

  • Normal git history viewers like `git log`, gitg, gitk, etc will show the graph of which images were used to produce which others, when, and so on.
  • `git checkout` can give you any raw image.tar you want to review.
  • Moving a branch reference to point to a different commit lets you tell dex what you want that image name to mean, because that's all the branch is.
  • `git branch -D` can drop any branch of images, and they disappear, and the disk space is reclaimable when you `git gc`.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Graph

type Graph struct {
	// contains filtered or unexported fields
}

func LoadGraph

func LoadGraph(dir string) *Graph

Loads a Graph if there is a git repo initialized at the given dir; returns nil if a graph repo not found. The dir must be the root of the working tree of the git dir.

A graph git repo is distingushed by containing branches that start with "hroot/" -- this is how hroot outputs branches that contain its data.

func NewGraph

func NewGraph(dir string) *Graph

Attempts to load a Graph at the given dir, or creates a new one if no graph repo is found. If a new graph is fabricated, it will be initialized by:

  • creating a new git repo,
  • making a blank root commit,
  • and tagging it with a branch name that declares it to be a graph repo.

Note if your cwd is already in a git repo, the new graph will not be commited, nor will it be made a submodule. You're free to make it a submodule yourself, but git quite wants you to have a remote url before it accepts your submodule.

func (*Graph) HasBranch

func (g *Graph) HasBranch(branch string) bool

Checks if the graph has a branch.

func (*Graph) IsConfigReady added in v0.5.2

func (g *Graph) IsConfigReady() bool

Is git ready and configured to make commits?

func (*Graph) Load

func (g *Graph) Load(lineage string, gr GraphLoadRequest) (hash string)

func (*Graph) Publish

func (g *Graph) Publish(lineage string, ancestor string, gr GraphStoreRequest) (hash string)

type GraphLoadRequest

type GraphLoadRequest interface {
	// contains filtered or unexported methods
}

type GraphLoadRequest_Image

type GraphLoadRequest_Image struct {
	Dock      *crocker.Dock
	ImageName string
}

type GraphLoadRequest_Tar

type GraphLoadRequest_Tar struct {
	Tarstream *tar.Writer
}

type GraphStoreRequest

type GraphStoreRequest interface {
	// contains filtered or unexported methods
}

type GraphStoreRequest_Container

type GraphStoreRequest_Container struct {
	Container *crocker.Container
	Settings  conf.Settings
}

type GraphStoreRequest_Tar

type GraphStoreRequest_Tar struct {
	Tarstream *tar.Reader
	Settings  conf.Settings
}

Jump to

Keyboard shortcuts

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