The Pastry DHT written in Go. https://freepastry.org
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
cmd/pastry
LICENSE
certificate.go
leafset.go
message.go
pastry.go
peer.go
readme.md

readme.md

Pastry

The Pastry DHT written in Go. Written specifically for Pastry Search.

Status

Under development.

Usage

package main

import (
	"fmt"
	"log"

	"github.com/uhthomas/pastry"
)

func main() {
	n, err := pastry.NewNode(nil)
	if err != nil {
		log.Fatal(err)
	}
	// if you want to edit messages before they're forwarded
	n.Forward = func(key, b, next []byte) {}
	for {
		m, err := n.Next()
		if err != nil {
			log.Fatal(err)
		}
		fmt.Println(m)
	}
}