network

package
v0.0.0-...-845418e Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2021 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UPSTREAM_ERROR_SLEEP_INTERVAL  = time.Second * 60
	BUSY_UPSTREAMS_REPORT_INTERVAL = time.Second * 60
	BUSY_UPSTREAMS_RETRY_INTERVAL  = time.Millisecond * 100
)
View Source
const (
	MAX_BYTES_TO_SEND    = 1 << 22 // 4mb
	MAX_MESSAGES_TO_SEND = 50      // if batches are big then too many batches could cause OOM eventually
)
View Source
const MIN_EVENT_BYTES_TO_COMPRESS = 1024 // only compress events larger than this size

Variables

This section is empty.

Functions

This section is empty.

Types

type Balancer

type Balancer struct {
	InChan chan *lsdProto.RequestNewEventsEventT // incoming events (from fs)
	// contains filtered or unexported fields
}

func NewBalancer

func NewBalancer(offsetsDb *offsets.Db, trafficManager *traffic.Manager, outBufferSize uint64, confRouting *lsdProto.LsdConfigClientConfigTRoutingConfigT) *Balancer

func (*Balancer) Start

func (b *Balancer) Start()

func (*Balancer) Stop

func (b *Balancer) Stop()

type Encoder

type Encoder interface {
	Encode(*lsdProto.RequestNewEventsEventT) error
}

type EncoderGzip

type EncoderGzip struct{}

func (*EncoderGzip) Encode

compresses event if enabled and not already compressed modifies event in place

type EncoderPlain

type EncoderPlain struct{}

func (*EncoderPlain) Encode

type IntHeap

type IntHeap []uint64

func (IntHeap) Len

func (h IntHeap) Len() int

func (IntHeap) Less

func (h IntHeap) Less(i, j int) bool

func (*IntHeap) Pop

func (h *IntHeap) Pop() interface{}

func (*IntHeap) Push

func (h *IntHeap) Push(x interface{})

func (IntHeap) Swap

func (h IntHeap) Swap(i, j int)

Jump to

Keyboard shortcuts

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