mirror of
https://github.com/logos-messaging/go-libp2p-pubsub.git
synced 2026-01-02 12:53:09 +00:00
docs: Tidy up (#271)
* docs: refresh README (badges, toc, license) * chore: update to permissive license stack * chore: add lead maintainer info * docs: update list of files in the README * docs: update list of files in the README Co-authored-by: vyzo <vyzo@hackzen.org>
This commit is contained in:
parent
f8820b5103
commit
33e5c23f6b
27
LICENSE
27
LICENSE
@ -1,21 +1,8 @@
|
||||
The MIT License (MIT)
|
||||
This project is transitioning from an MIT-only license to a dual MIT/Apache-2.0 license.
|
||||
Unless otherwise noted, all code contributed prior to 2019-05-06 and not contributed by
|
||||
a user listed in [this signoff issue](https://github.com/ipfs/go-ipfs/issues/6302) is
|
||||
licensed under MIT-only. All new contributions (and past contributions since 2019-05-06)
|
||||
are licensed under a dual MIT/Apache-2.0 license.
|
||||
|
||||
Copyright (c) 2016 Jeromy Johnson
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
MIT: https://www.opensource.org/licenses/mit
|
||||
Apache-2.0: https://www.apache.org/licenses/license-2.0
|
||||
5
LICENSE-APACHE
Normal file
5
LICENSE-APACHE
Normal file
@ -0,0 +1,5 @@
|
||||
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
|
||||
19
LICENSE-MIT
Normal file
19
LICENSE-MIT
Normal file
@ -0,0 +1,19 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
87
README.md
87
README.md
@ -1,9 +1,20 @@
|
||||
# go-libp2p-pubsub
|
||||
|
||||
[](http://protocol.ai)
|
||||
[](http://github.com/libp2p/libp2p)
|
||||
[](http://webchat.freenode.net/?channels=%23libp2p)
|
||||
[](https://discuss.libp2p.io)
|
||||
<p align="left">
|
||||
<a href="http://protocol.ai"><img src="https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square" /></a>
|
||||
<a href="http://libp2p.io/"><img src="https://img.shields.io/badge/project-libp2p-yellow.svg?style=flat-square" /></a>
|
||||
<a href="http://webchat.freenode.net/?channels=%23libp2p"><img src="https://img.shields.io/badge/freenode-%23libp2p-yellow.svg?style=flat-square" /></a>
|
||||
<a href="https://discuss.libp2p.io"><img src="https://img.shields.io/discourse/https/discuss.libp2p.io/posts.svg?style=flat-square"/></a>
|
||||
</p>
|
||||
|
||||
<p align="left">
|
||||
<a href="https://travis-ci.com/libp2p/hydra-booster"><img src="https://img.shields.io/travis/com/libp2p/hydra-booster/master?style=flat-square"></a>
|
||||
<a href="https://codecov.io/gh/libp2p/hydra-booster"><img src="https://img.shields.io/codecov/c/github/libp2p/hydra-booster?style=flat-square"></a>
|
||||
<a href="https://github.com/RichardLitt/standard-readme"><img src="https://img.shields.io/badge/readme%20style-standard-brightgreen.svg?style=flat-square" /></a>
|
||||
<a href="https://godoc.org/github.com/libp2p/go-libp2p-pubsub"><img src="http://img.shields.io/badge/godoc-reference-5272B4.svg?style=flat-square" /></a>
|
||||
<a href=""><img src="https://img.shields.io/badge/golang-%3E%3D1.14.0-orange.svg?style=flat-square" /></a>
|
||||
<br>
|
||||
</p>
|
||||
|
||||
> A pubsub system with flooding and gossiping variants.
|
||||
|
||||
@ -15,15 +26,27 @@ We currently provide three implementations:
|
||||
See [spec](https://github.com/libp2p/specs/tree/master/pubsub/gossipsub) and [implementation](https://github.com/libp2p/go-libp2p-pubsub/blob/master/gossipsub.go) for more details.
|
||||
- randomsub, which is a simple probabilistic router that propagates to random subsets of peers.
|
||||
|
||||
## Repo Lead Maintainer
|
||||
|
||||
[@vyzo](https://github.com/vyzo/)
|
||||
|
||||
> This repo follows the [Repo Lead Maintainer Protocol](https://github.com/ipfs/team-mgmt/blob/master/LEAD_MAINTAINER_PROTOCOL.md)
|
||||
|
||||
## Table of Contents
|
||||
|
||||
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
|
||||
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
|
||||
|
||||
- [Install](#install)
|
||||
- [Usage](#usage)
|
||||
- [Implementations](#implementations)
|
||||
- [Documentation](#documentation)
|
||||
- [Tracing](#tracing)
|
||||
- [Contribute](#contribute)
|
||||
- [License](#license)
|
||||
|
||||
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
|
||||
|
||||
## Install
|
||||
|
||||
```
|
||||
@ -34,23 +57,54 @@ go get github.com/libp2p/go-libp2p-pubsub
|
||||
|
||||
To be used for messaging in p2p instrastructure (as part of libp2p) such as IPFS, Ethereum, other blockchains, etc.
|
||||
|
||||
## Implementations
|
||||
### Examples
|
||||
|
||||
See [libp2p/specs/pubsub#Implementations](https://github.com/libp2p/specs/tree/master/pubsub#Implementations).
|
||||
`To be written`
|
||||
|
||||
## Documentation
|
||||
|
||||
See the [libp2p specs](https://github.com/libp2p/specs/tree/master/pubsub) for high level documentation
|
||||
and [godoc](https://godoc.org/github.com/libp2p/go-libp2p-pubsub) for API documentation.
|
||||
See the [libp2p specs](https://github.com/libp2p/specs/tree/master/pubsub) for high level documentation and [godoc](https://godoc.org/github.com/libp2p/go-libp2p-pubsub) for API documentation.
|
||||
|
||||
### In this repo, you will find
|
||||
|
||||
## Tracing
|
||||
See [libp2p/specs/pubsub#Implementations](https://github.com/libp2p/specs/tree/master/pubsub#Implementations).
|
||||
|
||||
The pubsub system supports _tracing_, which collects all events pertaining to the internals of the system.
|
||||
This allows you to recreate the complete message flow and state of the system for analysis purposes.
|
||||
```
|
||||
.
|
||||
├── LICENSE
|
||||
├── README.md
|
||||
# Regular Golang repo set up
|
||||
├── codecov.yml
|
||||
├── pb
|
||||
├── go.mod
|
||||
├── go.sum
|
||||
├── doc.go
|
||||
# PubSub base
|
||||
├── pubsub.go
|
||||
├── blacklist.go
|
||||
├── notify.go
|
||||
├── comm.go
|
||||
├── discovery.go
|
||||
├── sign.go
|
||||
├── subscription.go
|
||||
├── topic.go
|
||||
├── trace.go
|
||||
├── tracer.go
|
||||
├── validation.go
|
||||
# Floodsub router
|
||||
├── floodsub.go
|
||||
# Randomsub router
|
||||
├── randomsub.go
|
||||
# Gossipsub router
|
||||
├── gossipsub.go
|
||||
└── mcache.go
|
||||
```
|
||||
|
||||
To enable tracing, instantiate the pubsub system using the `WithEventTracer` option; the option
|
||||
accepts a tracer with three available implementations in-package (trace to json, pb, or a remote peer).
|
||||
### Tracing
|
||||
|
||||
The pubsub system supports _tracing_, which collects all events pertaining to the internals of the system. This allows you to recreate the complete message flow and state of the system for analysis purposes.
|
||||
|
||||
To enable tracing, instantiate the pubsub system using the `WithEventTracer` option; the option accepts a tracer with three available implementations in-package (trace to json, pb, or a remote peer).
|
||||
If you want to trace using a remote peer, you can do so using the `traced` daemon from [go-libp2p-pubsub-tracer](https://github.com/libp2p/go-libp2p-pubsub-tracer). The package also includes a utility program, `tracestat`, for analyzing the traces collected by the daemon.
|
||||
|
||||
For instance, to capture the trace as a json file, you can use the following option:
|
||||
@ -89,8 +143,7 @@ Small note: If editing the README, please conform to the [standard-readme](https
|
||||
|
||||
## License
|
||||
|
||||
[MIT](LICENSE) © Jeromy Johnson
|
||||
The go-libp2p-pubsub project is dual-licensed under Apache 2.0 and MIT terms:
|
||||
|
||||
---
|
||||
|
||||
The last gx published version of this module was: 0.11.16: QmfB4oDUTiaGEqT13P1JqCEhqW7cB1wpKtq3PP4BN8PhQd
|
||||
- Apache License, Version 2.0, ([LICENSE-APACHE](./LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0)
|
||||
- MIT license ([LICENSE-MIT](./LICENSE-MIT) or http://opensource.org/licenses/MIT)
|
||||
|
||||
11
maintainer.json
Normal file
11
maintainer.json
Normal file
@ -0,0 +1,11 @@
|
||||
{
|
||||
"repoLeadMaintainer": {
|
||||
"name": "Dimitris Vyzovitis",
|
||||
"email": "vyzo@protocol.ai",
|
||||
"username": "@vyzo"
|
||||
},
|
||||
"workingGroup": {
|
||||
"name": "libp2p",
|
||||
"entryPoint": "https://github.com/libp2p/libp2p"
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user