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: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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
⌂ 换网址