rpc

package
v0.0.0-...-62b3d66 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2017 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CommandRPC RPCType = 0x01
	RaftRPC            = 0x02
	GossipRPC          = 0x03
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Addr string

	Logger *jolt.Logger
}

type NetworkLayer

type NetworkLayer interface {
	Type() RPCType
	Handoff(net.Conn) error
}

type RPCType

type RPCType byte

type Server

type Server struct {
	net.Listener
	*rpc.Server
	// contains filtered or unexported fields
}

func NewServer

func NewServer(c *Config) (*Server, error)

func (*Server) AddNetworkLayer

func (s *Server) AddNetworkLayer(layer NetworkLayer)

func (*Server) Close

func (s *Server) Close() error

func (*Server) Handoff

func (s *Server) Handoff(conn net.Conn) error

func (*Server) Type

func (s *Server) Type() RPCType

Jump to

Keyboard shortcuts

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