dispatcher

package
v0.59.2 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2025 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConnectionDispatcher

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

func NewConnectionDispatcher

func NewConnectionDispatcher() *ConnectionDispatcher

func (*ConnectionDispatcher) AddListener

func (e *ConnectionDispatcher) AddListener(listener *ConnectionListener)

func (*ConnectionDispatcher) NotifyConnected

func (e *ConnectionDispatcher) NotifyConnected(peerConnID id.ConnID)

func (*ConnectionDispatcher) NotifyDisconnected

func (e *ConnectionDispatcher) NotifyDisconnected(peerConnID id.ConnID)

func (*ConnectionDispatcher) RemoveListener

func (e *ConnectionDispatcher) RemoveListener(listener *ConnectionListener)

type ConnectionListener

type ConnectionListener struct {
	OnConnected    func(peerID id.ConnID)
	OnDisconnected func(peerID id.ConnID)
}

Jump to

Keyboard shortcuts

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