rig

package module
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2019 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 DirectoryCreator added in v0.2.0

type DirectoryCreator interface {
	CreateDirectory(string) error
}

type ObjectStore added in v0.2.0

type ObjectStore interface {
	GetObject(name string) (io.ReadCloser, error)
	DeleteObject(name string) error
	PutObject(name string, data io.ReadSeeker, size int64) error
}

func NewFileObjectStore added in v0.2.0

func NewFileObjectStore(basePath string) ObjectStore

func NewS3ObjectStore added in v0.2.0

func NewS3ObjectStore(s3 *s3.S3, bucket string) ObjectStore

type Operation added in v0.0.3

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

type RiggedService added in v0.2.0

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

func NewRiggedService added in v0.2.0

func NewRiggedService(service Service, objectStore ObjectStore, prefix string) (*RiggedService, error)

func (*RiggedService) Apply added in v0.2.0

func (rs *RiggedService) Apply(op Operation, waitUntilDurable bool) error

Apply applies an operation.

func (*RiggedService) Flush added in v0.2.0

func (rs *RiggedService) Flush() (int, error)

func (*RiggedService) Recover added in v0.2.0

func (rs *RiggedService) Recover() error

func (*RiggedService) Snapshot added in v0.2.0

func (rs *RiggedService) Snapshot() error

func (*RiggedService) SnapshotVersion added in v0.2.0

func (rs *RiggedService) SnapshotVersion() uint64

type Service

type Service interface {
	Version() (uint64, error)
	Validate(Operation) error
	Apply(uint64, Operation) error
	Snapshot() (io.ReadSeeker, int64, error)
	Restore(uint64, io.Reader) error
}

Jump to

Keyboard shortcuts

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