types

package
v0.0.0-...-646ff60 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2024 License: CC0-1.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type P2P

type P2P interface {
	io.Closer
	Start(context.Context) error
	GetNetworkID() string
	GetPSK() []byte
	GetPeers() ([]Peer, error)
}

type Peer

type Peer interface {
	GetID() PeerID
	GetName() string
	DialContext(ctx context.Context, network string, addr string) (net.Conn, error)
}

type PeerID

type PeerID ed25519.PublicKey

func ParsePeerID

func ParsePeerID(s string) (PeerID, error)

func (PeerID) Less

func (id PeerID) Less(cmp PeerID) bool

func (PeerID) String

func (id PeerID) String() string

Jump to

Keyboard shortcuts

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