guard

package
v0.48.0-dev2 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2025 License: BSD-3-Clause Imports: 9 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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Guard

type Guard struct {
	Reconnect chan struct{}
	// contains filtered or unexported fields
}

Guard is responsible for the reconnection logic. It will trigger to send an offer to the peer then has connection issues. Watch these events: - Relay client reconnected to home server - Signal server connection state changed - ICE connection disconnected - Relayed connection disconnected - ICE candidate changes

func NewGuard

func NewGuard(log *log.Entry, isConnectedFn isConnectedFunc, timeout time.Duration, srWatcher *SRWatcher) *Guard

func (*Guard) SetICEConnDisconnected

func (g *Guard) SetICEConnDisconnected()

func (*Guard) SetRelayedConnDisconnected

func (g *Guard) SetRelayedConnDisconnected()

func (*Guard) Start

func (g *Guard) Start(ctx context.Context, eventCallback func())

type ICEMonitor

type ICEMonitor struct {
	ReconnectCh chan struct{}
	// contains filtered or unexported fields
}

func NewICEMonitor

func NewICEMonitor(iFaceDiscover stdnet.ExternalIFaceDiscover, config icemaker.Config) *ICEMonitor

func (*ICEMonitor) Start

func (cm *ICEMonitor) Start(ctx context.Context, onChanged func())

type SRWatcher

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

func NewSRWatcher

func NewSRWatcher(signalClient chNotifier, relayManager chNotifier, iFaceDiscover stdnet.ExternalIFaceDiscover, iceConfig ice.Config) *SRWatcher

NewSRWatcher creates a new SRWatcher. This watcher will notify the listeners when the ICE candidates change or the Relay connection is reconnected or the Signal client reconnected.

func (*SRWatcher) Close

func (w *SRWatcher) Close()

func (*SRWatcher) NewListener

func (w *SRWatcher) NewListener() chan struct{}

func (*SRWatcher) RemoveListener

func (w *SRWatcher) RemoveListener(listenerChan chan struct{})

func (*SRWatcher) Start

func (w *SRWatcher) Start()

Jump to

Keyboard shortcuts

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