go-libp2p-tutorial

command module
v0.0.0-...-a7dba51 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 1, 2023 License: MIT Imports: 9 Imported by: 0

README

Getting started guide for go-libp2p node


This repo contains source code example for running a simple node with libp2p's Go implementation called go-libp2p. The node can send and receive "ping" messages depending on how it started the execution.

Required commands:

  1. Build module:

    Unix/Linux: go build -o <OUTPUT_BINARY_NAME>

    or

    Windows: go build -o <OUTPUT_BINARY_NAME>.exe

  2. Run listening node in one terminal:

    Unix/Linux: ./OUTPUT_BINARY_NAME

    or

    Windows: OUTPUT_BINARY_NAME.exe

  3. Ping listening node from another terminal using multiaddress as command line argument:

    Unix/Linux: ./OUTPUT_BINARY_NAME multiaddress

    or

    Windows: OUTPUT_BINARY_NAME.exe multiaddress

Demo of build & execution:

Demo clip


Official reference guide: Run a go-libp2p node

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL