node

package
v0.0.0-...-3cacc02 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2020 License: MIT Imports: 18 Imported by: 0

Documentation

Overview

Package node contains an implementation of a pastry node that is compatible with libp2p. It uses the `dht` package as the main algorithms. This package functions as the IO layer for the dht.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Node

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

Node is a simple implementation that bridges libp2p IO to the pastry DHT state machine.

func New

func New(ctx context.Context, d *dht.DHT, h host.Host, w *internal.Writer) (*Node, error)

New returns a new Node.

func (*Node) FindPeer

func (n *Node) FindPeer(ctx context.Context, id peer.ID) (peer.AddrInfo, error)

FindPeer finds the closest AddrInfo to the passed ID.

func (*Node) Send

func (n *Node) Send(ctx context.Context, msg *pb.Message) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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