osrm-backend/examples/go-echo
Siarhei Fedartsou 0f6aab9da6 Squashed 'third_party/flatbuffers/' content from commit 595bf0007
git-subtree-dir: third_party/flatbuffers
git-subtree-split: 595bf0007ab1929570c7671f091313c8fc20644e
2024-06-22 13:33:34 +02:00
..
client Squashed 'third_party/flatbuffers/' content from commit 595bf0007 2024-06-22 13:33:34 +02:00
hero Squashed 'third_party/flatbuffers/' content from commit 595bf0007 2024-06-22 13:33:34 +02:00
net Squashed 'third_party/flatbuffers/' content from commit 595bf0007 2024-06-22 13:33:34 +02:00
server Squashed 'third_party/flatbuffers/' content from commit 595bf0007 2024-06-22 13:33:34 +02:00
go.mod Squashed 'third_party/flatbuffers/' content from commit 595bf0007 2024-06-22 13:33:34 +02:00
hero.fbs Squashed 'third_party/flatbuffers/' content from commit 595bf0007 2024-06-22 13:33:34 +02:00
net.fbs Squashed 'third_party/flatbuffers/' content from commit 595bf0007 2024-06-22 13:33:34 +02:00
README.md Squashed 'third_party/flatbuffers/' content from commit 595bf0007 2024-06-22 13:33:34 +02:00

Go Echo Example

A simple example demonstrating how to send flatbuffers over the network in Go.

Generate flatbuffer code

flatc -g --gen-object-api --go-module-name echo hero.fbs net.fbs

Running example

  1. Run go mod tidy to get dependencies
go mod tidy
  1. Start a server
go run server/server.go
  1. Run the client in another terminal
go run client/client.go