nativeconnectivity

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 Imports: 11 Imported by: 0 modules, 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 nativeconnectivity assembles the native peer transport used by application workflows. The workflow owns the returned factory's native connectivity and must stop it after its protocol sessions finish.

Index

Constants

This section is empty.

Variables

View Source
var ErrCapacityRequired = errors.New("application connectivity capacity is required")

Functions

func NewReceiver

func NewReceiver(config ReceiverConfig) (*v2peer.ReceiverFactory, error)

func NewSender

func NewSender(config SenderConfig) (*v2peer.Factory, error)

Types

type Capacity

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

Capacity belongs to one Engine, above tasks and connection generations. Keeping the authorities together prevents factory replacement from minting admission tokens while each module retains its own scheduling policy.

func NewCapacity

func NewCapacity(clock nativepeer.AdmissionClock) (*Capacity, error)

func (*Capacity) Attempts

func (capacity *Capacity) Attempts() *peerset.Capacity

func (*Capacity) NewNative

func (capacity *Capacity) NewNative(config nativepeer.Config) (*nativepeer.NativePeerConnectivity, error)

func (*Capacity) Sends

func (capacity *Capacity) Sends() *wsrtc.SendCapacity

type ReceiverConfig

type ReceiverConfig struct {
	SendCapacity   *wsrtc.SendCapacity
	Random         io.Reader
	Native         *nativepeer.NativePeerConnectivity
	Diagnostics    bool
	ObserveChannel func(*wsrtc.Channel)
}

type SenderConfig

type SenderConfig struct {
	Capacity       *Capacity
	TURN           turnpath.Accounts
	Now            func() time.Time
	Diagnostics    bool
	ObserveChannel func(*wsrtc.Channel)
	ICEPool        func() icepolicy.ICEEndpointPool
}

Jump to

Keyboard shortcuts

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