pastry

package module
v0.0.0-...-606166f Latest Latest
Warning

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

Go to latest
Published: May 13, 2020 License: MIT Imports: 6 Imported by: 0

README

pastry

⚠ WORK IN PROGRESS! ⚠

A libp2p compatible implementation of the Pastry DHT in go.

Documentation

Overview

Package pastry implements a pastry node.

The implementation is inspired by https://github.com/libp2p/go-libp2p-kad-dht, as well as various Pastry implementations including https://github.com/secondbit/wendy.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DeliverHandler

type DeliverHandler func(ctx context.Context, key []byte) error

type ForwardHandler

type ForwardHandler func(ctx context.Context, next []byte, key []byte) error

type Pastry

type Pastry struct {
	LeafSet         state.LeafSet
	NeighborhoodSet state.Set
	RoutingTable    state.RoutingTable
	// contains filtered or unexported fields
}

func New

func New(ctx context.Context, host host.Host) *Pastry

func (*Pastry) FindPeer

func (p *Pastry) FindPeer(ctx context.Context, id peer.ID) (peer.AddrInfo, error)

Directories

Path Synopsis
Package state contains structures related to a node's state as documented in the pastry paper.
Package state contains structures related to a node's state as documented in the pastry paper.

Jump to

Keyboard shortcuts

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