syncserver

package
v0.6.4 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2018 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PortRandom = -1
)

Variables

View Source
var (
	ErrReadFailed          = errors.New("Failed to read from client")
	ErrUnexpectedClientMsg = errors.New("Unexpected message from client")
)

Functions

This section is empty.

Types

type BreadcrumbProvider interface {
	CurrentBreadcrumb() *snapcache.Breadcrumb
}

type Config

type Config struct {
	Port                    int
	MaxMessageSize          int
	MaxFallBehind           time.Duration
	MinBatchingAgeThreshold time.Duration
	PingInterval            time.Duration
	PongTimeout             time.Duration
	DropInterval            time.Duration
	MaxConns                int
	HealthAggregator        *health.HealthAggregator
}

func (*Config) ApplyDefaults

func (c *Config) ApplyDefaults()

func (*Config) ListenPort

func (c *Config) ListenPort() int

type Server

type Server struct {
	Finished sync.WaitGroup
	// contains filtered or unexported fields
}

func New

func New(cache BreadcrumbProvider, config Config) *Server

func (*Server) Port

func (s *Server) Port() int

func (*Server) SetMaxConns

func (s *Server) SetMaxConns(numConns int)

func (*Server) Start

func (s *Server) Start(cxt context.Context)

Jump to

Keyboard shortcuts

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