osrm-backend/third_party/flatbuffers/examples/go-echo
2024-06-22 13:33:34 +02:00
..
client Merge commit '0f6aab9da6fe982218a01f4a5b896e65fcced437' as 'third_party/flatbuffers' 2024-06-22 13:33:34 +02:00
hero Merge commit '0f6aab9da6fe982218a01f4a5b896e65fcced437' as 'third_party/flatbuffers' 2024-06-22 13:33:34 +02:00
net Merge commit '0f6aab9da6fe982218a01f4a5b896e65fcced437' as 'third_party/flatbuffers' 2024-06-22 13:33:34 +02:00
server Merge commit '0f6aab9da6fe982218a01f4a5b896e65fcced437' as 'third_party/flatbuffers' 2024-06-22 13:33:34 +02:00
go.mod Merge commit '0f6aab9da6fe982218a01f4a5b896e65fcced437' as 'third_party/flatbuffers' 2024-06-22 13:33:34 +02:00
hero.fbs Merge commit '0f6aab9da6fe982218a01f4a5b896e65fcced437' as 'third_party/flatbuffers' 2024-06-22 13:33:34 +02:00
net.fbs Merge commit '0f6aab9da6fe982218a01f4a5b896e65fcced437' as 'third_party/flatbuffers' 2024-06-22 13:33:34 +02:00
README.md Merge commit '0f6aab9da6fe982218a01f4a5b896e65fcced437' as 'third_party/flatbuffers' 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