types

package
v0.0.0-...-407183c Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2025 License: CC0-1.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FuncSetupClient

type FuncSetupClient func(*grpc.ClientConn) error

type FuncSetupServer

type FuncSetupServer func(*grpc.Server) error

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)
	GRPCClient() *grpc.ClientConn
}

type PeerID

type PeerID ed25519.PublicKey

func ParsePeerID

func ParsePeerID(s string) (PeerID, error)

func (PeerID) Equal

func (id PeerID) Equal(cmp PeerID) bool

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