Comments (5)
You still require go 1.11.
from go-libp2p-examples.
mkdir /tmp/libp2p-examples
export GOPATH=/tmp/libp2p/examples
make deps
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o http-proxy proxy.go
#CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o http-proxy proxy.go
# github.com/libp2p/go-reuseport
/tmp/libp2p/examples/src/github.com/libp2p/go-reuseport/impl_wasm.go:10:53: listen redeclared in this block
previous declaration at /tmp/libp2p/examples/src/github.com/libp2p/go-reuseport/impl_unix.go:211:45
/tmp/libp2p/examples/src/github.com/libp2p/go-reuseport/impl_wasm.go:14:56: listenPacket redeclared in this block
previous declaration at /tmp/libp2p/examples/src/github.com/libp2p/go-reuseport/impl_unix.go:291:61
/tmp/libp2p/examples/src/github.com/libp2p/go-reuseport/impl_wasm.go:18:53: listenStream redeclared in this block
previous declaration at /tmp/libp2p/examples/src/github.com/libp2p/go-reuseport/impl_unix.go:260:59
/tmp/libp2p/examples/src/github.com/libp2p/go-reuseport/impl_wasm.go:22:87: dial redeclared in this block
previous declaration at /tmp/libp2p/examples/src/github.com/libp2p/go-reuseport/impl_unix.go:62:87
/tmp/libp2p/examples/src/github.com/libp2p/go-reuseport/impl_wasm.go:26:18: available redeclared in this block
previous declaration at /tmp/libp2p/examples/src/github.com/libp2p/go-reuseport/available_unix.go:23:18
#go get -t -v ./...
github.com/libp2p/go-libp2p-examples/chat
github.com/libp2p/go-libp2p-examples/echo
github.com/libp2p/go-libp2p-examples/http-proxy
github.com/libp2p/go-libp2p-examples/chat-with-rendezvous
# github.com/libp2p/go-libp2p-examples/chat
chat/chat.go:134:21: cannot use sourceMultiAddr (type "github.com/multiformats/go-multiaddr".Multiaddr) as type "gx/ipfs/QmNTCey11oxhb1AxDnQBRHtdhap6Ctud872NjAYPYYXPuc/go-multiaddr".Multiaddr in argument to libp2p.ListenAddrs:
"github.com/multiformats/go-multiaddr".Multiaddr does not implement "gx/ipfs/QmNTCey11oxhb1AxDnQBRHtdhap6Ctud872NjAYPYYXPuc/go-multiaddr".Multiaddr (wrong type for Decapsulate method)
have Decapsulate("github.com/multiformats/go-multiaddr".Multiaddr) "github.com/multiformats/go-multiaddr".Multiaddr
want Decapsulate("gx/ipfs/QmNTCey11oxhb1AxDnQBRHtdhap6Ctud872NjAYPYYXPuc/go-multiaddr".Multiaddr) "gx/ipfs/QmNTCey11oxhb1AxDnQBRHtdhap6Ctud872NjAYPYYXPuc/go-multiaddr".Multiaddr
chat/chat.go:135:18: cannot use prvKey (type "github.com/libp2p/go-libp2p-crypto".PrivKey) as type "gx/ipfs/QmNiJiXwWE3kRhZrC5ej3kSjWHm337pYfhjLGSCDNKJP2s/go-libp2p-crypto".PrivKey in argument to libp2p.Identity:
"github.com/libp2p/go-libp2p-crypto".PrivKey does not implement "gx/ipfs/QmNiJiXwWE3kRhZrC5ej3kSjWHm337pYfhjLGSCDNKJP2s/go-libp2p-crypto".PrivKey (wrong type for Equals method)
have Equals("github.com/libp2p/go-libp2p-crypto".Key) bool
want Equals("gx/ipfs/QmNiJiXwWE3kRhZrC5ej3kSjWHm337pYfhjLGSCDNKJP2s/go-libp2p-crypto".Key) bool
chat/chat.go:146:25: cannot use handleStream (type func("github.com/libp2p/go-libp2p-net".Stream)) as type "gx/ipfs/QmNgLg1NTw37iWbYPKcyK85YJ9Whs1MkPtJwhfqbNYAyKg/go-libp2p-net".StreamHandler in argument to host.SetStreamHandler
chat/chat.go:188:33: cannot use info.ID (type "github.com/libp2p/go-libp2p-peer".ID) as type "gx/ipfs/QmY5Grm8pJdiSSVsYxx4uNRgweY72EmYwuSDbRnbFok3iY/go-libp2p-peer".ID in argument to host.Peerstore().AddAddrs
chat/chat.go:188:42: cannot use info.Addrs (type []"github.com/multiformats/go-multiaddr".Multiaddr) as type []"gx/ipfs/QmNTCey11oxhb1AxDnQBRHtdhap6Ctud872NjAYPYYXPuc/go-multiaddr".Multiaddr in argument to host.Peerstore().AddAddrs
chat/chat.go:192:54: cannot use info.ID (type "github.com/libp2p/go-libp2p-peer".ID) as type "gx/ipfs/QmY5Grm8pJdiSSVsYxx4uNRgweY72EmYwuSDbRnbFok3iY/go-libp2p-peer".ID in argument to host.NewStream
# github.com/libp2p/go-libp2p-examples/echo
echo/main.go:48:18: cannot use priv (type "github.com/libp2p/go-libp2p-crypto".PrivKey) as type "gx/ipfs/QmNiJiXwWE3kRhZrC5ej3kSjWHm337pYfhjLGSCDNKJP2s/go-libp2p-crypto".PrivKey in argument to libp2p.Identity:
"github.com/libp2p/go-libp2p-crypto".PrivKey does not implement "gx/ipfs/QmNiJiXwWE3kRhZrC5ej3kSjWHm337pYfhjLGSCDNKJP2s/go-libp2p-crypto".PrivKey (wrong type for Equals method)
have Equals("github.com/libp2p/go-libp2p-crypto".Key) bool
want Equals("gx/ipfs/QmNiJiXwWE3kRhZrC5ej3kSjWHm337pYfhjLGSCDNKJP2s/go-libp2p-crypto".Key) bool
echo/main.go:67:30: cannot use hostAddr (type "github.com/multiformats/go-multiaddr".Multiaddr) as type "gx/ipfs/QmNTCey11oxhb1AxDnQBRHtdhap6Ctud872NjAYPYYXPuc/go-multiaddr".Multiaddr in argument to addr.Encapsulate:
"github.com/multiformats/go-multiaddr".Multiaddr does not implement "gx/ipfs/QmNTCey11oxhb1AxDnQBRHtdhap6Ctud872NjAYPYYXPuc/go-multiaddr".Multiaddr (wrong type for Decapsulate method)
have Decapsulate("github.com/multiformats/go-multiaddr".Multiaddr) "github.com/multiformats/go-multiaddr".Multiaddr
want Decapsulate("gx/ipfs/QmNTCey11oxhb1AxDnQBRHtdhap6Ctud872NjAYPYYXPuc/go-multiaddr".Multiaddr) "gx/ipfs/QmNTCey11oxhb1AxDnQBRHtdhap6Ctud872NjAYPYYXPuc/go-multiaddr".Multiaddr
echo/main.go:75:2: cannot use basicHost (type "gx/ipfs/QmaoXrM4Z41PD48JY36YqQGKQpLGjyLA2cKcLsES7YddAq/go-libp2p-host".Host) as type "github.com/libp2p/go-libp2p-host".Host in return argument:
"gx/ipfs/QmaoXrM4Z41PD48JY36YqQGKQpLGjyLA2cKcLsES7YddAq/go-libp2p-host".Host does not implement "github.com/libp2p/go-libp2p-host".Host (wrong type for Addrs method)
have Addrs() []"gx/ipfs/QmNTCey11oxhb1AxDnQBRHtdhap6Ctud872NjAYPYYXPuc/go-multiaddr".Multiaddr
want Addrs() []"github.com/multiformats/go-multiaddr".Multiaddr
github.com/libp2p/go-libp2p-examples/libp2p-host
github.com/libp2p/go-libp2p-examples/multipro
# github.com/libp2p/go-libp2p-examples/chat-with-rendezvous
chat-with-rendezvous/chat.go:102:43: cannot use ([]"github.com/multiformats/go-multiaddr".Multiaddr)(config.ListenAddresses) (type []"github.com/multiformats/go-multiaddr".Multiaddr) as type []"gx/ipfs/QmNTCey11oxhb1AxDnQBRHtdhap6Ctud872NjAYPYYXPuc/go-multiaddr".Multiaddr in argument to libp2p.ListenAddrs
chat-with-rendezvous/chat.go:112:35: cannot use "github.com/libp2p/go-libp2p-protocol".ID(config.ProtocolID) (type "github.com/libp2p/go-libp2p-protocol".ID) as type "gx/ipfs/QmZNkThpqfVXs9GNbexPrfBbXSLNYeKrE7jwFM2oqHbyqN/go-libp2p-protocol".ID in argument to host.SetStreamHandler
chat-with-rendezvous/chat.go:112:35: cannot use handleStream (type func("github.com/libp2p/go-libp2p-net".Stream)) as type "gx/ipfs/QmNgLg1NTw37iWbYPKcyK85YJ9Whs1MkPtJwhfqbNYAyKg/go-libp2p-net".StreamHandler in argument to host.SetStreamHandler
chat-with-rendezvous/chat.go:118:35: cannot use host (type "gx/ipfs/QmaoXrM4Z41PD48JY36YqQGKQpLGjyLA2cKcLsES7YddAq/go-libp2p-host".Host) as type "github.com/libp2p/go-libp2p-host".Host in argument to dht.New:
"gx/ipfs/QmaoXrM4Z41PD48JY36YqQGKQpLGjyLA2cKcLsES7YddAq/go-libp2p-host".Host does not implement "github.com/libp2p/go-libp2p-host".Host (wrong type for Addrs method)
have Addrs() []"gx/ipfs/QmNTCey11oxhb1AxDnQBRHtdhap6Ctud872NjAYPYYXPuc/go-multiaddr".Multiaddr
want Addrs() []"github.com/multiformats/go-multiaddr".Multiaddr
chat-with-rendezvous/chat.go:138:32: cannot use *peerinfo (type "github.com/libp2p/go-libp2p-peerstore".PeerInfo) as type "gx/ipfs/QmPiemjiKBC9VA7vZF82m4x1oygtg2c2YVqag8PX7dN1BD/go-libp2p-peerstore".PeerInfo in argument to host.Connect
chat-with-rendezvous/chat.go:163:14: invalid operation: peer.ID == host.ID() (mismatched types "github.com/libp2p/go-libp2p-peer".ID and "gx/ipfs/QmY5Grm8pJdiSSVsYxx4uNRgweY72EmYwuSDbRnbFok3iY/go-libp2p-peer".ID)
chat-with-rendezvous/chat.go:169:42: cannot use peer.ID (type "github.com/libp2p/go-libp2p-peer".ID) as type "gx/ipfs/QmY5Grm8pJdiSSVsYxx4uNRgweY72EmYwuSDbRnbFok3iY/go-libp2p-peer".ID in argument to host.NewStream
chat-with-rendezvous/chat.go:169:58: cannot use "github.com/libp2p/go-libp2p-protocol".ID(config.ProtocolID) (type "github.com/libp2p/go-libp2p-protocol".ID) as type "gx/ipfs/QmZNkThpqfVXs9GNbexPrfBbXSLNYeKrE7jwFM2oqHbyqN/go-libp2p-protocol".ID in argument to host.NewStream
github.com/libp2p/go-libp2p-examples/protocol-multiplexing-with-multicodecs
# github.com/libp2p/go-libp2p-examples/libp2p-host
libp2p-host/host.go:36:18: cannot use priv (type "github.com/libp2p/go-libp2p-crypto".PrivKey) as type "gx/ipfs/QmNiJiXwWE3kRhZrC5ej3kSjWHm337pYfhjLGSCDNKJP2s/go-libp2p-crypto".PrivKey in argument to libp2p.Identity:
"github.com/libp2p/go-libp2p-crypto".PrivKey does not implement "gx/ipfs/QmNiJiXwWE3kRhZrC5ej3kSjWHm337pYfhjLGSCDNKJP2s/go-libp2p-crypto".PrivKey (wrong type for Equals method)
have Equals("github.com/libp2p/go-libp2p-crypto".Key) bool
want Equals("gx/ipfs/QmNiJiXwWE3kRhZrC5ej3kSjWHm337pYfhjLGSCDNKJP2s/go-libp2p-crypto".Key) bool
# github.com/libp2p/go-libp2p-examples/http-proxy
http-proxy/proxy.go:37:2: cannot use host (type "gx/ipfs/QmaoXrM4Z41PD48JY36YqQGKQpLGjyLA2cKcLsES7YddAq/go-libp2p-host".Host) as type "github.com/libp2p/go-libp2p-host".Host in return argument:
"gx/ipfs/QmaoXrM4Z41PD48JY36YqQGKQpLGjyLA2cKcLsES7YddAq/go-libp2p-host".Host does not implement "github.com/libp2p/go-libp2p-host".Host (wrong type for Addrs method)
have Addrs() []"gx/ipfs/QmNTCey11oxhb1AxDnQBRHtdhap6Ctud872NjAYPYYXPuc/go-multiaddr".Multiaddr
want Addrs() []"github.com/multiformats/go-multiaddr".Multiaddr
# github.com/libp2p/go-libp2p-examples/multipro
multipro/main.go:23:21: cannot use listen (type "github.com/multiformats/go-multiaddr".Multiaddr) as type "gx/ipfs/QmNTCey11oxhb1AxDnQBRHtdhap6Ctud872NjAYPYYXPuc/go-multiaddr".Multiaddr in argument to libp2p.ListenAddrs:
"github.com/multiformats/go-multiaddr".Multiaddr does not implement "gx/ipfs/QmNTCey11oxhb1AxDnQBRHtdhap6Ctud872NjAYPYYXPuc/go-multiaddr".Multiaddr (wrong type for Decapsulate method)
have Decapsulate("github.com/multiformats/go-multiaddr".Multiaddr) "github.com/multiformats/go-multiaddr".Multiaddr
want Decapsulate("gx/ipfs/QmNTCey11oxhb1AxDnQBRHtdhap6Ctud872NjAYPYYXPuc/go-multiaddr".Multiaddr) "gx/ipfs/QmNTCey11oxhb1AxDnQBRHtdhap6Ctud872NjAYPYYXPuc/go-multiaddr".Multiaddr
multipro/main.go:24:18: cannot use priv (type "github.com/libp2p/go-libp2p-crypto".PrivKey) as type "gx/ipfs/QmNiJiXwWE3kRhZrC5ej3kSjWHm337pYfhjLGSCDNKJP2s/go-libp2p-crypto".PrivKey in argument to libp2p.Identity:
"github.com/libp2p/go-libp2p-crypto".PrivKey does not implement "gx/ipfs/QmNiJiXwWE3kRhZrC5ej3kSjWHm337pYfhjLGSCDNKJP2s/go-libp2p-crypto".PrivKey (wrong type for Equals method)
have Equals("github.com/libp2p/go-libp2p-crypto".Key) bool
want Equals("gx/ipfs/QmNiJiXwWE3kRhZrC5ej3kSjWHm337pYfhjLGSCDNKJP2s/go-libp2p-crypto".Key) bool
multipro/main.go:27:16: cannot use host (type "gx/ipfs/QmaoXrM4Z41PD48JY36YqQGKQpLGjyLA2cKcLsES7YddAq/go-libp2p-host".Host) as type "github.com/libp2p/go-libp2p-host".Host in argument to NewNode:
"gx/ipfs/QmaoXrM4Z41PD48JY36YqQGKQpLGjyLA2cKcLsES7YddAq/go-libp2p-host".Host does not implement "github.com/libp2p/go-libp2p-host".Host (wrong type for Addrs method)
have Addrs() []"gx/ipfs/QmNTCey11oxhb1AxDnQBRHtdhap6Ctud872NjAYPYYXPuc/go-multiaddr".Multiaddr
want Addrs() []"github.com/multiformats/go-multiaddr".Multiaddr
github.com/libp2p/go-libp2p-examples/relay
# github.com/libp2p/go-libp2p-examples/protocol-multiplexing-with-multicodecs
protocol-multiplexing-with-multicodecs/main.go:83:2: cannot use h (type "gx/ipfs/QmaoXrM4Z41PD48JY36YqQGKQpLGjyLA2cKcLsES7YddAq/go-libp2p-host".Host) as type "github.com/libp2p/go-libp2p-host".Host in return argument:
"gx/ipfs/QmaoXrM4Z41PD48JY36YqQGKQpLGjyLA2cKcLsES7YddAq/go-libp2p-host".Host does not implement "github.com/libp2p/go-libp2p-host".Host (wrong type for Addrs method)
have Addrs() []"gx/ipfs/QmNTCey11oxhb1AxDnQBRHtdhap6Ctud872NjAYPYYXPuc/go-multiaddr".Multiaddr
want Addrs() []"github.com/multiformats/go-multiaddr".Multiaddr
# github.com/libp2p/go-libp2p-examples/relay
relay/main.go:24:64: cannot use "github.com/libp2p/go-libp2p-circuit".OptHop (type "github.com/libp2p/go-libp2p-circuit".RelayOpt) as type "gx/ipfs/QmWuMW6UKZMJo9bFFDwnjg8tW3AtKisMHHrXEutQdmJ19N/go-libp2p-circuit".RelayOpt in argument to libp2p.EnableRelay
relay/main.go:35:5: cannot use h2.ID() (type "gx/ipfs/QmY5Grm8pJdiSSVsYxx4uNRgweY72EmYwuSDbRnbFok3iY/go-libp2p-peer".ID) as type "github.com/libp2p/go-libp2p-peer".ID in field value
relay/main.go:36:8: cannot use h2.Addrs() (type []"gx/ipfs/QmNTCey11oxhb1AxDnQBRHtdhap6Ctud872NjAYPYYXPuc/go-multiaddr".Multiaddr) as type []"github.com/multiformats/go-multiaddr".Multiaddr in field value
relay/main.go:40:41: cannot use h2info (type "github.com/libp2p/go-libp2p-peerstore".PeerInfo) as type "gx/ipfs/QmPiemjiKBC9VA7vZF82m4x1oygtg2c2YVqag8PX7dN1BD/go-libp2p-peerstore".PeerInfo in argument to h1.Connect
relay/main.go:43:41: cannot use h2info (type "github.com/libp2p/go-libp2p-peerstore".PeerInfo) as type "gx/ipfs/QmPiemjiKBC9VA7vZF82m4x1oygtg2c2YVqag8PX7dN1BD/go-libp2p-peerstore".PeerInfo in argument to h3.Connect
relay/main.go:48:31: cannot use func literal (type func("github.com/libp2p/go-libp2p-net".Stream)) as type "gx/ipfs/QmNgLg1NTw37iWbYPKcyK85YJ9Whs1MkPtJwhfqbNYAyKg/go-libp2p-net".StreamHandler in argument to h3.SetStreamHandler
relay/main.go:71:14: impossible type assertion:
*swarm.Swarm does not implement "gx/ipfs/QmNgLg1NTw37iWbYPKcyK85YJ9Whs1MkPtJwhfqbNYAyKg/go-libp2p-net".Network (wrong type for ClosePeer method)
have ClosePeer("github.com/libp2p/go-libp2p-peer".ID) error
want ClosePeer("gx/ipfs/QmY5Grm8pJdiSSVsYxx4uNRgweY72EmYwuSDbRnbFok3iY/go-libp2p-peer".ID) error
relay/main.go:74:5: cannot use h3.ID() (type "gx/ipfs/QmY5Grm8pJdiSSVsYxx4uNRgweY72EmYwuSDbRnbFok3iY/go-libp2p-peer".ID) as type "github.com/libp2p/go-libp2p-peer".ID in field value
relay/main.go:77:41: cannot use h3relayInfo (type "github.com/libp2p/go-libp2p-peerstore".PeerInfo) as type "gx/ipfs/QmPiemjiKBC9VA7vZF82m4x1oygtg2c2YVqag8PX7dN1BD/go-libp2p-peerstore".PeerInfo in argument to h1.Connect
from go-libp2p-examples.
See #40, it may help.
from go-libp2p-examples.
#go build -o xxx proxy.go
# github.com/libp2p/go-reuseport
/root/go/src/github.com/libp2p/go-reuseport/impl_wasm.go:10:53: listen redeclared in this block
previous declaration at /root/go/src/github.com/libp2p/go-reuseport/impl_unix.go:211:45
/root/go/src/github.com/libp2p/go-reuseport/impl_wasm.go:14:56: listenPacket redeclared in this block
previous declaration at /root/go/src/github.com/libp2p/go-reuseport/impl_unix.go:291:61
/root/go/src/github.com/libp2p/go-reuseport/impl_wasm.go:18:53: listenStream redeclared in this block
previous declaration at /root/go/src/github.com/libp2p/go-reuseport/impl_unix.go:260:59
/root/go/src/github.com/libp2p/go-reuseport/impl_wasm.go:22:87: dial redeclared in this block
previous declaration at /root/go/src/github.com/libp2p/go-reuseport/impl_unix.go:62:87
/root/go/src/github.com/libp2p/go-reuseport/impl_wasm.go:26:18: available redeclared in this block
previous declaration at /root/go/src/github.com/libp2p/go-reuseport/available_unix.go:23:18
from go-libp2p-examples.
#apt update;apt upgrade -yy
#go version
go version go1.11.4 linux/amd64
ok
from go-libp2p-examples.
Related Issues (20)
- pubsub\chat example - Can't see others clients messages HOT 1
- Relay Example error HOT 2
- pubsub chat example datarace
- how to init RendezvousString in chat-with-rendezvous? HOT 2
- How do I keep nodeID unchanged every time I start it HOT 4
- Does libP2P support authentication? HOT 1
- How can i make other peers persist when another peer disconnects HOT 2
- An Error in Echo client/server with libp2p
- Dependencies out of date
- Automated testing
- How can I help PRs get merged? HOT 2
- chat-with-rendezvous doesn't work: dht failed to query self during routing table refresh HOT 3
- Add Example on configuring and using AutoRelay
- Add example to show how to configure AutoNAT client and how it discovers reachability
- go-libp2p-autonat-svc deprecated
- libp2p-host example missing _peer import
- Should I openStream every time like multipro did
- Errors with simple libp2p HOT 1
- routed-echo example: invalid character '-' after top-level value
- Modifying http_proxy/proxy.go to make the remote proxy to act as an egress gateway to connect to a non-p2p real server. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from go-libp2p-examples.