storage

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2016 License: MIT Imports: 4 Imported by: 1

Documentation

Overview

Package storage is responsible for the persistent storage of state.

Sous state is stored in a file hierarchy like this:

/
    defs.yaml
    manifests/
        github.com/
            username/
                reponame/
                    dirname/
                        subdirname.yaml

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DiskStateManager

type DiskStateManager struct {
	Codec *hy.Codec
	// contains filtered or unexported fields
}

DiskStateManager implements StateReader and StateWriter using disk storage as its back-end.

func NewDiskStateManager

func NewDiskStateManager(baseDir string) *DiskStateManager

NewDiskStateManager returns a new DiskStateManager configured to read and write from a filesystem tree containing YAML files.

func (*DiskStateManager) ReadState

func (dsm *DiskStateManager) ReadState() (*sous.State, error)

ReadState loads the entire intended state of the world from a dir.

func (*DiskStateManager) WriteState

func (dsm *DiskStateManager) WriteState(s *sous.State) error

WriteState records the entire intended state of the world to a dir.

Jump to

Keyboard shortcuts

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