syncserver

package
v3.2.4+incompatible Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2018 License: Apache-2.0 Imports: 22 Imported by: 9

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
	KeyFile                 string
	CertFile                string
	CAFile                  string
	ClientCN                string
	ClientURISAN            string
}

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