server

package
v0.0.0-...-8f072b4 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2021 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// HTTPAddr contains the port used by this node
	HTTPAddr string
)

Functions

This section is empty.

Types

type JoinRequest

type JoinRequest struct {
	Addr string      `json:"addr"`
	Id   interface{} `json:"id"`
}

type Service

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

Service is a type to be used by the raft consensus protocol consists of a base http address and a store in the finite state machine

func NewService

func NewService(addr string, store *base.Store) *Service

NewService is used to initialize a new service struct parameters: addr (a string of a http address), store (a store of node details) returns: *Service (a newly initialized service struct)

func (*Service) Start

func (service *Service) Start()

Jump to

Keyboard shortcuts

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