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 ¶
var ErrCapacityRequired = errors.New("application connectivity capacity is required")
Functions ¶
func NewReceiver ¶
func NewReceiver(config ReceiverConfig) (*v2peer.ReceiverFactory, 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.
Sender and receiver TURN permits are isolated because a receiver holds its permit until LANE_ATTACH; sharing one pool lets four outbound receiver lines deadlock or starve the paired local sender in the same Engine.
func NewCapacity ¶
func NewCapacity(clock nativepeer.AdmissionClock, monitor nativepeer.NetworkMonitor) *Capacity
func (*Capacity) NewNative ¶
func (capacity *Capacity) NewNative(config nativepeer.Config) (*nativepeer.NativePeerConnectivity, error)
func (*Capacity) ReceiverTURN ¶ added in v0.1.6
func (capacity *Capacity) ReceiverTURN() *turnsession.Capacity
func (*Capacity) SenderTURN ¶ added in v0.1.6
func (capacity *Capacity) SenderTURN() *turnsession.Capacity
func (*Capacity) Sends ¶
func (capacity *Capacity) Sends() *wsrtc.SendCapacity
type ReceiverConfig ¶
type ReceiverConfig struct {
Capacity *Capacity
Random io.Reader
Native *nativepeer.NativePeerConnectivity
Diagnostics bool
ObserveChannel func(*wsrtc.Channel)
}
type SenderConfig ¶
type SenderConfig struct {
Trace diagnostics.Sink
TURNProvider turnsession.Provider
Capacity *Capacity
Now func() time.Time
Diagnostics bool
ObserveChannel func(*wsrtc.Channel)
ICEPool func() icepolicy.ICEEndpointPool
}