transport

package
v0.0.0-...-73c317a Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

type Manager struct {
	// contains filtered or unexported fields
}

func NewManager

func NewManager(
	networkID int64,
	endpointID ksuid.KSUID,
	endpointName string,
	listenAddress *net.UDPAddr,
	listenInterface string,
	discoveryManager *discovery.Manager,
	networkManager *network.Manager,
	onReceive func(*types.Container),
) *Manager

func (*Manager) Broadcast

func (m *Manager) Broadcast(
	resendTimeout time.Duration,
	resendExpiry time.Duration,
	correlationID ksuid.KSUID,
	fragmentCount int64,
	fragmentIndex int64,
	needsAck bool,
	payload []byte,
)

func (*Manager) Send

func (m *Manager) Send(
	resendPeriod time.Duration,
	resendExpiry time.Duration,
	correlationID ksuid.KSUID,
	fragmentCount int64,
	fragmentIndex int64,
	destinationEndpointID ksuid.KSUID,
	destinationEndpointName string,
	needsAck bool,
	isAck bool,
	payload []byte,
) error

func (*Manager) Start

func (m *Manager) Start()

func (*Manager) Stop

func (m *Manager) Stop()

type Receiver

type Receiver struct {
	// contains filtered or unexported fields
}

func NewReceiver

func NewReceiver(
	networkID int64,
	listenAddress *net.UDPAddr,
	interfaceName string,
	networkManager *network.Manager,
	sender *Sender,
	onReceive func(*types.Container),
) *Receiver

func (*Receiver) Start

func (r *Receiver) Start()

func (*Receiver) Stop

func (r *Receiver) Stop()

type Sender

type Sender struct {
	// contains filtered or unexported fields
}

func NewSender

func NewSender(
	networkID int64,
	endpointID ksuid.KSUID,
	endpointName string,
	discoveryManager *discovery.Manager,
	networkManager *network.Manager,
) *Sender

func (*Sender) Broadcast

func (s *Sender) Broadcast(
	resendTimeout time.Duration,
	resendExpiry time.Duration,
	correlationID ksuid.KSUID,
	fragmentCount int64,
	fragmentIndex int64,
	needsAck bool,
	payload []byte,
)

func (*Sender) MarkAck

func (s *Sender) MarkAck(container *types.Container)

func (*Sender) Send

func (s *Sender) Send(
	resendPeriod time.Duration,
	resendExpiry time.Duration,
	correlationID ksuid.KSUID,
	fragmentCount int64,
	fragmentIndex int64,
	destinationEndpointID ksuid.KSUID,
	destinationEndpointName string,
	needsAck bool,
	isAck bool,
	payload []byte,
) error

func (*Sender) SendAck

func (s *Sender) SendAck(container *types.Container) error

func (*Sender) Start

func (s *Sender) Start()

func (*Sender) Stop

func (s *Sender) Stop()

Jump to

Keyboard shortcuts

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