git

package
v0.0.0-...-dd9b6ef Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2020 License: MIT Imports: 18 Imported by: 0

README

git State Store adapter

Notes on this adapter

Significant effort has been made to make this adapter fault tolerant, but this is hard. This adapter is for those who can tolerate the occasional difficulties that arrise from the git server being down or other network hiccups. (This might mean deleting the pod hambone is running in and starting from the latest commit.)

This adapter does support etcd locks so that it can be run in replica.

TODO
  • if a committed push fails, retry and eventually, release lock, return error to caller, (shutdown, self-delete pod)?

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// TrackedUncommittedChangesError indicates a request's Instance has tracked but uncommitted changes in the working tree. This could indicate a bug, and likely needs fixed manually.
	TrackedUncommittedChangesError = status.Error(codes.FailedPrecondition, "tracked uncommitted changes")
	// UnTrackedUncommittedChangesError indicates a request's Instance has untracked and uncommitted changes in the working tree. This could indicate a bug, and likely needs fixed manually.
	UnTrackedUncommittedChangesError = status.Error(codes.FailedPrecondition, "untracked uncommitted changes")
)

Functions

This section is empty.

Types

type Engine

type Engine struct {
	WorkingDir      string
	EndpointsString string
	EtcdLocksGitKey string
	Branch          string
}

Engine fulfills the StateStore interface

func (*Engine) Init

func (engine *Engine) Init() error

Init does setup

func (*Engine) NewDeleter

func (engine *Engine) NewDeleter(instance *pb.Instance, instancesDir string) state.Deleter

NewDeleter returns an initialized Deleter

func (*Engine) NewGetter

func (engine *Engine) NewGetter(options *pb.GetOptions, list *pb.InstanceList, instancesDir string) state.Getter

NewGetter returns an initialized Getter

func (*Engine) NewTemplatesGetter

func (engine *Engine) NewTemplatesGetter(list *pb.InstanceList, templatesDir string) state.TemplatesGetter

NewTemplatesGetter returns an initialized TemplatesGetter

func (*Engine) NewUpdater

func (engine *Engine) NewUpdater(instance *pb.Instance, instancesDir string) state.Updater

NewUpdater returns an initialized Updater

Jump to

Keyboard shortcuts

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