serviceD

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

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

Go to latest
Published: Mar 9, 2020 License: Apache-2.0 Imports: 16 Imported by: 0

README

serviceD

A high-performance implementation of service discovery based on Raft protocol in Golang

Client

https://github.com/monkeymq/serviceDClient

Documentation

Index

Constants

View Source
const (
	WRITEABLE         = int32(1)
	READONLY          = int32(0)
	WRITEABLE_ERR_MSG = "Forbidden\n"
)

Variables

This section is empty.

Functions

func New

func New(opts *options) *serviceD

func NewHttpServer

func NewHttpServer(s *serviceD, log *log.Logger) *httpServer

func NewOptions

func NewOptions() *options

Types

type FSM

type FSM serviceD

func (*FSM) Apply

func (f *FSM) Apply(l *raft.Log) interface{}

Apply applies a Raft log entry to the key-value store.

func (*FSM) Restore

func (f *FSM) Restore(rc io.ReadCloser) error

Restore stores the key-value store to a previous state.

func (*FSM) Snapshot

func (f *FSM) Snapshot() (raft.FSMSnapshot, error)

Snapshot returns a snapshot of the key-value store.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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