syncserver

package
v3.8.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2019 License: Apache-2.0 Imports: 22 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")
	ErrUnsupportedClientFeature = errors.New("Unsupported client feature")
)

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(caches map[syncproto.SyncerType]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