go/

directory
v0.0.0-...-709b0c4 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2021 License: CC-BY-4.0

README

ProductInfo Service and Client - Go Implementation

Building and Running Service

In order to build, Go to Go module root directory location (grpc-continous-integration/go/server) and execute the following shell command,

go build -i -v -o bin/server

In order to run, Go to Go module root directory location (grpc-continous-integration/go/server) and execute the following shell command,

./bin/server

Building and Running Client

In order to build, Go to Go module root directory location (grpc-continous-integration/go/client) and execute the following shell command,

go build -i -v -o bin/client

In order to run, Go to Go module root directory location (grpc-continous-integration/go/client) and execute the following shell command,

./bin/client

Running Test

Creating Docker Network

    docker network create my-net

Building Server

    docker image build -t grpc-productinfo-server -f server/Dockerfile .
    docker run -it --network=my-net --name=productinfo --hostname=productinfo -p 50051:50051  grpc-productinfo-server

Building Client

    docker image build -t grpc-productinfo-client -f client/Dockerfile .
    docker run -it --network=my-net --hostname=client grpc-productinfo-client   
     

Tagging and Pushing to a Docker Registry

    docker image tag grpc-productinfo-server kasunindrasiri/grpc-productinfo-server
    docker image tag grpc-productinfo-client kasunindrasiri/grpc-productinfo-client
    docker image push kasunindrasiri/grpc-productinfo-server
    docker image push kasunindrasiri/grpc-productinfo-client

Directories

Path Synopsis
Package mock_proto_gen is a generated GoMock package.
Package mock_proto_gen is a generated GoMock package.

Jump to

Keyboard shortcuts

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