server

package
v0.2.6 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2019 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// Addr is http server address
	Addr string
	// Port is http server port
	Port string
	// PeerBuf is the list of peers
	PeerBuf *peer.Buffer
	// MsgBuf is the list of messages
	MsgBuf *buffer.MessageBuffer
	// GossipRound is the gossip round number
	GossipRound *round.GossipRound
	// Logger
	Logger *log.Logger
	// Customo Callbacks Registry
	CustomCallbacks *callback.CustomRegistry
	// Default Callback Registry
	DefaultCallbacks *callback.DefaultRegistry
}

Config has configs for http server

type Server added in v0.1.6

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

Server is exported type for server

func New

func New(cfg Config) *Server

New creates new server

func (*Server) Start added in v0.1.6

func (s *Server) Start(stop <-chan struct{}) error

Start starts the server

Jump to

Keyboard shortcuts

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