rpc

package
v0.0.0-...-dd8e2c6 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2019 License: MIT Imports: 7 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Call

type Call struct {
	In interface{}
	C  chan Resp
}

func (*Call) Respond

func (c *Call) Respond(val interface{}, err error)

type Client

type Client interface {
	Deal() error
	Close()
	GetId() int32
	schema.NodeClient
}

func NewClient

func NewClient(id int32, address string) Client

func NewClients

func NewClients(nodes []env.Node) []Client

type Resp

type Resp struct {
	Val interface{}
	Err error
}

type Server

type Server interface {
	GetAppendEntriesCh() chan Call
	GetRequestVoteCh() chan Call
	GetNewEntryCh() chan Call
	GetLogCh() chan Call
	Start(context.Context) error
	Stop()
	schema.NodeServer
}

func NewServer

func NewServer(config env.Node) Server

Jump to

Keyboard shortcuts

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