Ecosyste.ms: Packages

An open API service providing package, version and dependency metadata of many open source software ecosystems and registries.

Top 2.4% on proxy.golang.org
Top 0.4% dependent packages on proxy.golang.org
Top 0.3% dependent repos on proxy.golang.org
Top 5.1% forks on proxy.golang.org
Top 0.3% docker downloads on proxy.golang.org

proxy.golang.org : github.com/libp2p/go-libp2p-http

Package p2phttp allows to serve HTTP endpoints and make HTTP requests through LibP2P (https://github.com/libp2p/libp2p) using Go's standard "http" and "net" stacks. Instead of the regular "host:port" addressing, `p2phttp` uses a Peer ID and lets LibP2P take care of the routing, thus taking advantage of features like multi-routes, NAT transversal and stream multiplexing over a single connection. When already running a LibP2P facility, this package allows to expose existing HTTP-based services (like REST APIs) through LibP2P and to use those services with minimal changes to the code-base. For example, a simple http.Server on LibP2P works as: As shown above, a Server only needs a "github.com/libp2p/go-libp2p-gostream" listener. This listener will use a libP2P host to watch for stream tagged with our Protocol. On the other side, a client just needs to be initialized with a custom LibP2P host-based transport to perform requests to such server: In the example above, the client registers a "libp2p" protocol for which the custom transport is used. It can still perform regular "http" requests. The protocol name used is arbitraty and non standard. Note that LibP2P hosts cannot dial to themselves, so there is no possibility of using the same host as server and as client.

Registry - Source - Documentation - JSON
purl: pkg:golang/github.com/libp2p/go-libp2p-http
Keywords: go, http, ipfs, libp2p
License: MIT
Latest release: about 1 year ago
First release: about 5 years ago
Namespace: github.com/libp2p
Dependent packages: 160
Dependent repositories: 545
Stars: 50 on GitHub
Forks: 19 on GitHub
Docker dependents: 44
Docker downloads: 64,645,965
See more repository details: repos.ecosyste.ms
Last synced: 16 days ago

    Loading...
    Readme
    Loading...