http2raft

package module
v0.0.0-...-f8cd7f2 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2019 License: GPL-2.0 Imports: 15 Imported by: 0

README

http2raft - Raft based clusters exposed as HTTP server

http2raft is a simple framework to build fault-tolerant key-value clusters controlled by Raft consensus and available over HTTP. It allows to implement easily Raft-cluster with custom implementation of your own state machine. Raft will "feed" your state machine with committed log entries and your implementation is responsible to process these entries.

Implementation

The idea is simple - http2raft runs HTTP server and Raft-node at the same time. All GET requests to HTTP server turn into reads of your Raft-cluster state. All POST, PUT, PATCH and DELETE HTTP requests will turn in to change state of your Raft-cluster.

Please have a look at Examples

NOTE: http2raft is an experiment and IS NOT supposed to be used in production!

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Start

func Start(addr string, smFactoryFunc func(clusterID, nodeID uint64) statemachine.IStateMachine)

Start starts taft-node, sets up routing amd starts HTTP listener

Types

This section is empty.

Directories

Path Synopsis
examples

Jump to

Keyboard shortcuts

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