weron

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: 31 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 struct {
	// contains filtered or unexported fields
}

func NewP2P

func NewP2P(
	ctx context.Context,
	privKey crypto.PrivateKey,
	peerName string,
	networkID string,
	psk []byte,
	networkCIDR string,
) (*P2P, error)

func (*P2P) Close

func (p *P2P) Close() (_err error)

func (*P2P) GetNetworkID

func (p *P2P) GetNetworkID() string

func (*P2P) GetPSK

func (p *P2P) GetPSK() []byte

func (*P2P) GetPeerID

func (p *P2P) GetPeerID() types.PeerID

func (*P2P) GetPeers

func (p *P2P) GetPeers() ([]types.Peer, error)

func (*P2P) Start

func (p *P2P) Start(
	ctx context.Context,
) (_err error)

type Peer

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

func (Peer) Close

func (p Peer) Close() error

func (*Peer) DialContext

func (p *Peer) DialContext(
	ctx context.Context,
	network string,
	addr string,
) (net.Conn, error)

func (Peer) GRPCConn

func (p Peer) GRPCConn() *grpc.ClientConn

func (*Peer) GetID

func (p *Peer) GetID() types.PeerID

func (*Peer) GetName

func (p *Peer) GetName() string

Directories

Path Synopsis
cmd
protobuf

Jump to

Keyboard shortcuts

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