tcp

package
v1.3.17 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2020 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const HARNESS_OUTGOING_CONNECTIONS_INIT_TIMEOUT = 3 * time.Second
View Source
const HARNESS_PEER_READ_TIMEOUT = 1 * time.Second
View Source
const MAX_PAYLOADS_IN_MESSAGE = 100000
View Source
const MAX_PAYLOAD_SIZE_BYTES = 20 * 1024 * 1024
View Source
const SEND_QUEUE_MAX_BYTES = 20 * 1024 * 1024
View Source
const SEND_QUEUE_MAX_MESSAGES = 1000
View Source
const TEST_KEEP_ALIVE_INTERVAL = 20 * time.Millisecond
View Source
const TEST_NETWORK_TIMEOUT = 1 * time.Second

Variables

View Source
var DataExceedsCapacityError = errors.Errorf("Data exceeds allowed size %d", SEND_QUEUE_MAX_BYTES)
View Source
var LogTag = log.String("adapter", "gossip")

Functions

func NewQueueFullError added in v1.3.10

func NewQueueFullError(bytesAttempted int, bytesInQueue int, queueSize int) error

func NewTransportQueue

func NewTransportQueue(maxSizeBytes int, maxSizeMessages int, metricFactory metric.Factory, peerNodeAddress string) *transportQueue

Types

type DirectTransport added in v1.1.0

type DirectTransport struct {
	govnr.TreeSupervisor
	// contains filtered or unexported fields
}

func NewDirectTransport

func NewDirectTransport(parentCtx context.Context, config config.GossipTransportConfig, parentLogger log.Logger, registry metric.Registry) *DirectTransport

func (*DirectTransport) GetServerPort added in v1.2.1

func (t *DirectTransport) GetServerPort() int

func (*DirectTransport) GracefulShutdown added in v1.2.1

func (t *DirectTransport) GracefulShutdown(shutdownContext context.Context)

func (*DirectTransport) IsServerListening added in v1.1.0

func (t *DirectTransport) IsServerListening() bool

func (*DirectTransport) RegisterListener added in v1.1.0

func (t *DirectTransport) RegisterListener(listener adapter.TransportListener, listenerNodeAddress primitives.NodeAddress)

func (*DirectTransport) Send added in v1.1.0

func (*DirectTransport) UpdateTopology added in v1.2.1

func (t *DirectTransport) UpdateTopology(bgCtx context.Context, newPeers adapter.TransportPeers)

Jump to

Keyboard shortcuts

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