package
0.0.0-20191105120815-58dbcc3e8e63
Repository: https://github.com/weaveworks/mesh.git
Documentation: pkg.go.dev

# README

meshconn

meshconn implements net.PacketConn on top of mesh. Think of it as UDP with benefits: NAT and bastion host (DMZ) traversal, broadcast/multicast in networks where this is normally not possible e.g. EC2, and an up-to-date, queryable memberlist.

meshconn supports net.Addr of the form weavemesh://<PeerName>. By default, <PeerName> is a hardware address of the form 01:02:03:FD:FE:FF. Other forms of PeerName e.g. hashes are supported.

meshconn itself is largely stateless and has best-effort delivery semantics. As a future experiment, it could easily be amended to have basic resiliency guarantees. Also, at the moment, PacketConn read and write deadlines are not supported.

# Functions

NewPeer returns a Peer, which can be used as a net.PacketConn.

# Variables

ErrGossipNotRegistered is returned by Write to when attempting to write before a mesh.Gossip has been registered in the peer.
ErrNotMeshAddr is returned by WriteTo when attempting to write to a non-mesh address.
ErrNotSupported is returned by methods that are not supported.
ErrPeerClosed is returned by ReadFrom and WriteTo when the peer is closed during the operation.
ErrShortRead is returned by ReadFrom when the passed buffer is too small for the packet.

# Structs

MeshAddr implements net.Addr for mesh peers.
Peer implements mesh.Gossiper and net.PacketConn.