项目作者: nimona

项目描述 :
Peer to peer networking library
高级语言: Go
项目地址: git://github.com/nimona/go-nimona.git
创建时间: 2017-10-15T01:48:36Z
项目社区:https://github.com/nimona/go-nimona

开源协议:MIT License

下载



nimona

a new internet stack; or something like it.

⚠️ Note: Nimona’s architecture is getting an ovehaul based on the findings of the first version and more information should be popping up in the v1/main branch soon.


Nimona

Nimona’s main goal is to provide a number of layers/components to help with
the challenges presented when dealing with decentralized and peer to peer
applications.

Development

Requirements

  • go 1.18+ with modules enabled
  • Make

Getting Started

  1. git clone https://github.com/nimona/go-nimona.git go-nimona
  2. cd go-nimona
  3. make deps

Process / Workflow

Nimona is developed using Git Common-Flow, which is
essentially GitHub Flow
with the addition of versioned releases, and optional release branches.

In addition to the Common-Flow spec, contributors are also highly encouraged to
sign commits.

Library Architecture

Library Architecture

Network

Package exchange is responsible for a number of things around connections and
object exchange, as well as relaying objects to inaccessible peers.

  1. type Network interface {
  2. Subscribe(
  3. filters ...EnvelopeFilter,
  4. ) EnvelopeSubscription
  5. Send(
  6. ctx context.Context,
  7. object object.Object,
  8. recipient *peer.ConnectionInfo,
  9. ) error
  10. Listen(
  11. ctx context.Context,
  12. bindAddress string,
  13. ) (Listener, error)
  14. }

Resolver

Package resolver is responsible for looking up peers on the network that
fulfill specific requirements.

  1. type Resolver interface {
  2. Lookup(
  3. ctx context.Context,
  4. opts ...LookupOption,
  5. ) (<-chan *peer.ConnectionInfo, error)
  6. }

The currently available LookupOption are the following, and can be used
on their own or in groups.

  1. func LookupByDigest(hash tilde.Digest) LookupOption { ... }
  2. func LookupByDID(id did.DID) LookupOption { ... }