rig

package module
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2018 License: MIT Imports: 15 Imported by: 4

README

The Rig


CircleCI GoDoc experimental

Go framework for building stateful, replicated services

Projects that use the Rig

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HTTPError added in v0.0.7

type HTTPError interface {
	StatusCode() int
}

HTTPError represents an HTTP error that has an associated status code.

type LogPayload added in v0.0.4

type LogPayload struct {
	Version uint64    `json:"version"`
	Op      Operation `json:"op"`
}

LogPayload is request payload for log operations.

func NewLogPayload added in v0.0.4

func NewLogPayload(version uint64, op Operation) *LogPayload

type Operation added in v0.0.3

type Operation struct {
	Method string `json:"method"`
	Data   []byte `json:"data"`
}

Operation represents a log operation.

func NewOperation added in v0.0.4

func NewOperation(method string, data json.RawMessage) Operation

NewOperation returns a new Operation.

type Rig added in v0.0.3

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

func New added in v0.0.3

func New(logDir string, service Service, applyCommits bool, token, peer string) (*Rig, error)

New returns a new Rig.

func (*Rig) DoHandler added in v0.0.4

func (r *Rig) DoHandler() http.Handler

func (*Rig) LogHandler added in v0.0.4

func (r *Rig) LogHandler() http.Handler

type Service

type Service interface {
	Validate(Operation) error
	Apply(uint64, Operation) error
	LockResources(Operation) bool
	UnlockResources(Operation)
}

Jump to

Keyboard shortcuts

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