Skip to content

Tutorial

This tutorial will guide you to create your sample application on your system.

You will need Docker (or complient runtime) and Go installed

Container Runtime

Linux

First, make sure to have a container runtime installed like Docker or podman.

MacOS

If you use a MacOS system, then it is recommended to use Docker Desktop.

Windows

If you use Windows, it is highly recommended to install WSL and Docker Desktop.

Sample Application

Open a command prompt and make a new directory:

mkdir hello
cd hello

Populate with the sample application from the grpc-framework:

curl -L \
  https://github.com/libopenstorage/grpc-framework/archive/refs/heads/master.tar.gz | \
  tar xz --strip=3 "grpc-framework-master/test/app"

Run go mod init. See Golang: Getting Started for more information:

go mod init hello

Now add the grpc-framework as a dependency:

go get github.com/libopenstorage/grpc-framework@latest

Let golang determine the rest of the dependencies:

go mod tidy

Build:

make

Run the server:

./bin/server

On another terminal run the client:

./bin/client