event

package
v0.0.0-...-eb0558f Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2023 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EventOnBrokerRendezvous

type EventOnBrokerRendezvous struct {
	SnowflakeEvent
	WebRTCRemoteDescription *webrtc.SessionDescription
	Error                   error
}

func (EventOnBrokerRendezvous) String

func (e EventOnBrokerRendezvous) String() string

type EventOnCurrentNATTypeDetermined

type EventOnCurrentNATTypeDetermined struct {
	SnowflakeEvent
	CurNATType string
}

func (EventOnCurrentNATTypeDetermined) String

type EventOnOfferCreated

type EventOnOfferCreated struct {
	SnowflakeEvent
	WebRTCLocalDescription *webrtc.SessionDescription
	Error                  error
}

func (EventOnOfferCreated) String

func (e EventOnOfferCreated) String() string

type EventOnProxyConnectionOver

type EventOnProxyConnectionOver struct {
	SnowflakeEvent
	InboundTraffic  int64
	OutboundTraffic int64
}

func (EventOnProxyConnectionOver) String

type EventOnProxyStarting

type EventOnProxyStarting struct {
	SnowflakeEvent
}

func (EventOnProxyStarting) String

func (e EventOnProxyStarting) String() string

type EventOnProxyStats

type EventOnProxyStats struct {
	SnowflakeEvent
	ConnectionCount             int
	InboundBytes, OutboundBytes int64
	InboundUnit, OutboundUnit   string
	SummaryInterval             time.Duration
}

func (EventOnProxyStats) String

func (e EventOnProxyStats) String() string

type EventOnSnowflakeConnected

type EventOnSnowflakeConnected struct {
	SnowflakeEvent
}

func (EventOnSnowflakeConnected) String

func (e EventOnSnowflakeConnected) String() string

type EventOnSnowflakeConnectionFailed

type EventOnSnowflakeConnectionFailed struct {
	SnowflakeEvent
	Error error
}

func (EventOnSnowflakeConnectionFailed) String

type SnowflakeEvent

type SnowflakeEvent interface {
	IsSnowflakeEvent()
	String() string
}

type SnowflakeEventDispatcher

type SnowflakeEventDispatcher interface {
	SnowflakeEventReceiver
	// AddSnowflakeEventListener allow receiver(s) to receive event notification
	// when OnNewSnowflakeEvent is called on the dispatcher.
	// Every event listener added will be called when an event is received by the dispatcher.
	// The order each listener is called is undefined.
	AddSnowflakeEventListener(receiver SnowflakeEventReceiver)
	RemoveSnowflakeEventListener(receiver SnowflakeEventReceiver)
}

func NewSnowflakeEventDispatcher

func NewSnowflakeEventDispatcher() SnowflakeEventDispatcher

type SnowflakeEventReceiver

type SnowflakeEventReceiver interface {
	// OnNewSnowflakeEvent notify receiver about a new event
	// This method MUST not block
	OnNewSnowflakeEvent(event SnowflakeEvent)
}

Jump to

Keyboard shortcuts

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