peerslot

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2026 License: AGPL-3.0, AGPL-3.0 Imports: 2 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package peerslot owns bounded negotiation identities for one receiver session.

Index

Constants

View Source
const Count = 4

Count bounds session replay metadata independently of physical path churn.

Variables

View Source
var (
	ErrCapacity = errors.New("peer negotiation slots are occupied")
	ErrClosed   = errors.New("peer negotiation slot is closed")
	ErrSequence = errors.New("peer negotiation sequence is exhausted")
)

Functions

This section is empty.

Types

type Attempt

type Attempt struct {
	Slot     uint8
	Sequence uint64
}

type Lease

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

func (*Lease) Close

func (l *Lease) Close()

Close follows the path's joined teardown, so a delayed producer cannot spend sequence numbers belonging to its successor.

func (*Lease) Next

func (l *Lease) Next() (Attempt, error)

type Pool

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

Pool retains sequence watermarks for the session, including while slots are vacant. Replacing a physical path must not reset its replay protection.

func (*Pool) Acquire

func (p *Pool) Acquire() (*Lease, error)

Jump to

Keyboard shortcuts

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