grpc-go-server-example

command module
v0.0.0-...-1d9caf3 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2021 License: MIT Imports: 13 Imported by: 0

README

grpc-go-server-example

Example of grpc service.

INSTALL

The cert folder should contain the x509 certificate: certificate.crt and privateKey.key The certificate can be generated with the following command openssl openssl req -x509 -sha256 -nodes -days 365 -newkey rsa:2048 -keyout privateKey.key -out certificate.crt

Service can be deployed with using docker compose docker-compose up

The following environment variables can be used in order to specify the machine where memcached is located
MEMCACHE_HOST
MEMCACHE_PORT\

The test client can be run from root directory with using follwing command: go run client\main.go

Or sent the POST request to the localhost:50051/v1/fibonacciSlice with json object: Example: {"start":0,"end":0}

The integration Unit Tests can run with using following command: docker-compose -f .\docker-compose.test.yml -p ci up --abort-on-container-exit

Note

The int64 is using in service in order to support bigger value need to change the type ([]byte..)

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
Package grpcserver is a reverse proxy.
Package grpcserver is a reverse proxy.

Jump to

Keyboard shortcuts

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