Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dills122/p2p-test
WIP, test P2P network for messaging other nodes in the network with interactive shell
https://github.com/dills122/p2p-test
go golang grpc p2p-network
Last synced: 8 days ago
JSON representation
WIP, test P2P network for messaging other nodes in the network with interactive shell
- Host: GitHub
- URL: https://github.com/dills122/p2p-test
- Owner: dills122
- License: other
- Created: 2021-11-19T01:37:30.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2024-12-16T16:32:55.000Z (about 2 months ago)
- Last Synced: 2024-12-16T17:41:05.881Z (about 2 months ago)
- Topics: go, golang, grpc, p2p-network
- Language: Go
- Homepage:
- Size: 28.3 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
- License: LICENSE
Awesome Lists containing this project
README
# Test P2P Network
Experiment with P2P networks using gRPC in golang.
## Getting Started
```bash
go get -u
go mod tidy
```Generating proto files
```bash
protoc --go_out=plugins=grpc:. --go_opt=paths=source_relative pkg/ping/ping.proto
```Get info on all the available commands
```sh
go run ./main.go --help```
You can do a test execution with the ping test command, this will setup two nodes that will ping each other.
```sh
go run ./main.go pingTest```
## Interactive Shell Mode
You can start up nodes in an interactive shell mode to allow you to communicate with the network.
```sh
go run ./main.go start --address 172.0.0.1:9999
# full list of args `cmd\node\start.go` init()
```Once your node is booted up successfully, the interactive shell will start and you can begin to enter commands.
Currently the only working commands:
- `send` - send a message to the network and to all online nodes
- `exit` - shutdown node and exit network