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.
func NewCapacity ¶
func NewCapacity(clock nativepeer.AdmissionClock) (*Capacity, error)
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)
}