server

package module
v0.0.0-...-7ef8827 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2016 License: AGPL-3.0, AGPL-3.0-only Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ServerVersion                 = "0.3.1"
	MDBInitialSize                = 1048576
	TwoToTheSixtyThree            = 9223372036854775808
	SubmissionMinSubmitDelay      = 2 * time.Millisecond
	SubmissionMaxSubmitDelay      = 2 * time.Second
	VarRollDelayMin               = 50 * time.Millisecond
	VarRollDelayMax               = 500 * time.Millisecond
	VarRollTimeExpectation        = 3 * time.Millisecond
	VarRollPRequirement           = 0.9
	VarRollForceNotFirstAfter     = time.Second
	ConnectionRestartDelayRangeMS = 5000
	ConnectionRestartDelayMin     = 3 * time.Second
	MostRandomByteIndex           = 7 // will be the lsb of a big-endian client-n in the txnid.
	MigrationBatchElemCount       = 64
	PoissonSamples                = 64
)

Variables

View Source
var EmptyStructVal = EmptyStruct{}

Functions

func CheckFatal

func CheckFatal(e error)

func CheckWarn

func CheckWarn(e error) bool

func SegToBytes

func SegToBytes(seg *capn.Segment) []byte

Types

type BinaryBackoffEngine

type BinaryBackoffEngine struct {
	Cur time.Duration
	// contains filtered or unexported fields
}

func NewBinaryBackoffEngine

func NewBinaryBackoffEngine(rng *rand.Rand, min, max time.Duration) *BinaryBackoffEngine

func (*BinaryBackoffEngine) Advance

func (bbe *BinaryBackoffEngine) Advance() time.Duration

func (*BinaryBackoffEngine) After

func (bbe *BinaryBackoffEngine) After(fun func())

func (*BinaryBackoffEngine) Shrink

func (bbe *BinaryBackoffEngine) Shrink(roundToZero time.Duration)

type EmptyStruct

type EmptyStruct struct{}

func (EmptyStruct) String

func (es EmptyStruct) String() string

type LogFunc

type LogFunc func(...interface{})
var Log LogFunc = LogFunc(func(elems ...interface{}) {})

type StatusConsumer

type StatusConsumer struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func NewStatusConsumer

func NewStatusConsumer() *StatusConsumer

func (*StatusConsumer) Consume

func (s *StatusConsumer) Consume(fun func(string))

func (*StatusConsumer) Emit

func (s *StatusConsumer) Emit(status ...string)

func (*StatusConsumer) Fork

func (s *StatusConsumer) Fork() *StatusConsumer

func (*StatusConsumer) Join

func (s *StatusConsumer) Join()

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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