mirror of
https://github.com/fluencelabs/js-libp2p-interfaces
synced 2025-03-16 19:41:05 +00:00
This commit is contained in:
parent
e1b7badc2d
commit
3b0a98ccf0
14
README.md
14
README.md
@ -1,11 +1,11 @@
|
||||
abstract-transport
|
||||
abstract-connection
|
||||
==================
|
||||
|
||||
[](http://ipn.io) [](http://webchat.freenode.net/?channels=%23ipfs)
|
||||
|
||||
> A test suite and interface you can use to implement a transport. A transport is understood as something that offers mechanism for writing and reading data, back pressure, half and full duplex streams. This module and test suite were heavily inspired by abstract-blob-store and abstract-stream-muxer.
|
||||
> A test suite and interface you can use to implement a connection. A connection is understood as something that offers mechanism for writing and reading data, back pressure, half and full duplex streams. This module and test suite were heavily inspired by abstract-blob-store and abstract-stream-muxer.
|
||||
|
||||
The primary goal of module is to enable developers to pick, swap or upgrade their transport without loosing the same API expectations and mechanisms such as back pressure and the hability to half close a stream.
|
||||
The primary goal of module is to enable developers to pick, swap or upgrade their connection without loosing the same API expectations and mechanisms such as back pressure and the hability to half close a connection.
|
||||
|
||||
Publishing a test suite as a module lets multiple modules all ensure compatibility since they use the same test suite.
|
||||
|
||||
@ -22,7 +22,7 @@ The API is presented with both Node.js and Go primitives, however, there is not
|
||||
|
||||
Include this badge in your readme if you make a module that is compatible with the abstract-connection API. You can validate this by running the tests.
|
||||
|
||||

|
||||

|
||||
|
||||
# How to use the battery of tests
|
||||
|
||||
@ -30,12 +30,12 @@ Include this badge in your readme if you make a module that is compatible with t
|
||||
|
||||
```
|
||||
var tape = require('tape')
|
||||
var tests = require('abstract-transport/tests')
|
||||
var YourTransportHandler = require('../src')
|
||||
var tests = require('abstract-connection/tests')
|
||||
var YourConnectionHandler = require('../src')
|
||||
|
||||
var common = {
|
||||
setup: function (t, cb) {
|
||||
cb(null, YourTransportHandler)
|
||||
cb(null, YourConnectionHandler)
|
||||
},
|
||||
teardown: function (t, cb) {
|
||||
cb()
|
||||
|
BIN
img/badge.png
BIN
img/badge.png
Binary file not shown.
Before Width: | Height: | Size: 5.1 KiB After Width: | Height: | Size: 5.1 KiB |
BIN
img/badge.sketch
BIN
img/badge.sketch
Binary file not shown.
File diff suppressed because one or more lines are too long
Before Width: | Height: | Size: 9.5 KiB After Width: | Height: | Size: 42 KiB |
10
package.json
10
package.json
@ -1,10 +1,10 @@
|
||||
{
|
||||
"name": "abstract-transport",
|
||||
"name": "abstract-connection",
|
||||
"version": "0.0.0",
|
||||
"description": "A test suite and interface you can use to implement a transport interface.",
|
||||
"description": "A test suite and interface you can use to implement a connection interface.",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/diasdavid/abstract-transport.git"
|
||||
"url": "https://github.com/diasdavid/abstract-connection.git"
|
||||
},
|
||||
"keywords": [
|
||||
"IPFS"
|
||||
@ -12,7 +12,7 @@
|
||||
"author": "David Dias <daviddias@ipfs.io>",
|
||||
"license": "MIT",
|
||||
"bugs": {
|
||||
"url": "https://github.com/diasdavid/abstract-transport/issues"
|
||||
"url": "https://github.com/diasdavid/abstract-connection/issues"
|
||||
},
|
||||
"homepage": "https://github.com/diasdavid/abstract-transport"
|
||||
"homepage": "https://github.com/diasdavid/abstract-connection"
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user