chapter7/

directory
v0.0.0-...-96b9560 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2024 License: MIT

README

Chapter 7 - Out of the box features

This is based on the work done in chapter6 folder.

This folder shows how more advanced features that comes out of the box with gRPC (error handling, interceptors, load balancing, ...). The main code for the implementations can be found in the following files:

Running the code

Server
go run
$ buf generate proto # or with protoc (see chapter4/README.md)
$ go run ./server 0.0.0.0:50051
bazel run
$ bazel run //server:server 0.0.0.0:50051
Client
go run
# if not done before `buf generate proto` or with protoc (see chapter4/README.md)
$ go run ./client 0.0.0.0:50051
bazel run
$ bazel run //client:client 0.0.0.0:50051
Kubernetes (k8s)

In order to show the load balancing effects, this folder introduces configurations for deploying the server and client to Kubernetes.

A Kubernetes is required in order to make the following command work. If you have kind installed, you can run the following command to quickly spin up a cluster: kind create cluster --config k8s/kind.yaml.

Server
$ kubectl apply -f k8s/server.yaml
Client
$ kubectl apply -f k8s/client.yaml

Directories

Path Synopsis
client module
proto
todov2 Module
server module

Jump to

Keyboard shortcuts

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