GithubHelp home page GithubHelp logo

isabella232 / interface-content-routing Goto Github PK

View Code? Open in Web Editor NEW

This project forked from libp2p/interface-content-routing

0.0 0.0 0.0 349 KB

⛔️ DEPRECATED: interface-content-routing is now included in https://github.com/libp2p/js-interfaces

License: MIT License

JavaScript 100.00%

interface-content-routing's Introduction

⛔️ DEPRECATED: interface-content-routing is now included in libp2p-interfaces

interface-content-routing

Discourse posts

A test suite and interface you can use to implement a Content Routing module for libp2p.

The primary goal of this module is to enable developers to pick and swap their Content Routing module as they see fit for their libp2p installation, without having to go through shims or compatibility issues. This module and test suite were heavily inspired by abstract-blob-store and interface-stream-muxer.

Publishing a test suite as a module lets multiple modules all ensure compatibility since they use the same test suite.

The API is presented with both Node.js and Go primitives, however, there is not actual limitations for it to be extended for any other language, pushing forward the cross compatibility and interop through diferent stacks.

Lead Maintainer

Vasco Santos.

Modules that implement the interface

Badge

Include this badge in your readme if you make a module that is compatible with the interface-content-routing API. You can validate this by running the tests.

How to use the battery of tests

Node.js

var tape = require('tape')
var tests = require('interface-content-routing/tests')
var yourImpl = require('../src')

var common = {
    setup: function (t, cb) {
      cb(null, yourImpl)
    },
    teardown: function (t, cb) {
      cb()
    }
}

tests(tape, common)

Go

WIP - The go-libp2p implementation does not have a test suite to be used, yet.

API

A valid (read: that follows this abstraction) Content Routing module must implement the following API.

.findProviders

  • JavaScript peerRouting.findProviders

.provide

  • JavaScript peerRouting.provide

interface-content-routing's People

Contributors

vasco-santos avatar daviddias avatar anacrolix avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.