types

package
v2.11.0 Latest Latest
Warning

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

Go to latest
Published: May 1, 2024 License: MIT Imports: 3 Imported by: 1

Documentation

Index

Constants

View Source
const PeerIDLength = 32

Variables

This section is empty.

Functions

This section is empty.

Types

type Message

type Message struct {
	Sender  PeerID
	Payload []byte
}

type Peer

type Peer interface {
	services.Service
	ID() PeerID
	UpdateConnections(peers map[PeerID]StreamConfig) error
	Send(peerID PeerID, msg []byte) error
	Receive() <-chan Message
}

type PeerID

type PeerID = ragetypes.PeerID

type PeerWrapper

type PeerWrapper interface {
	services.Service
	GetPeer() Peer
}

type Signer

type Signer interface {
	Sign(data []byte) ([]byte, error)
}

type StreamConfig

type StreamConfig struct {
	IncomingMessageBufferSize int
	OutgoingMessageBufferSize int
	MaxMessageLenBytes        int
	MessageRateLimiter        ragep2p.TokenBucketParams
	BytesRateLimiter          ragep2p.TokenBucketParams
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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