relay

package
v0.0.0-...-22e7416 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotInit = errors.New("not_init")
)

Functions

This section is empty.

Types

type Hub

type Hub interface {
	ListenAndServe() error
	Close() error
}

func NewHub

func NewHub(listenAddr string) (Hub, error)

type Peer

type Peer interface {
	Write(m *relay_pb.Message) error
	DialAndServe(serve func(m *relay_pb.Message)) error
	Close() error
}

func NewPeer

func NewPeer(name string, listenAddr string, relayAddr string) (Peer, error)

Directories

Path Synopsis
proto

Jump to

Keyboard shortcuts

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