grpc-api-example

command module
v0.0.0-...-e854597 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2024 License: MIT Imports: 20 Imported by: 0

README

grpc-api-example

This repository demonstrates how to use gRPC with Go and various plugins. It's a simple API to manage notes. It uses grpc-gateway to handle HTTP requests and openapi to define API specs.

Demonstrated features

  • buf.build framework
  • grpc gateway + openapi specs and swagger UI
  • graceful server shut down (designed for orchestration systems such as k8s)
  • gRPC health check protocol.
  • rpc message validation
  • gRPC services testing

⚠️ For demo purposes, encryption wasn't properly handled in this project.

Installation

This project uses go1.20.

$ make install-tools
$ make build
Run the server
$ ./bin/server -h
Usage of ./bin/server:
  -grpc-server-endpoint string
    	gRPC server endpoint (default "localhost:9090")
  -http-server-endpoint string
    	HTTP server endpoint (default "localhost:8000")

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
proto
notes/v1
Package notesv1 is a reverse proxy.
Package notesv1 is a reverse proxy.

Jump to

Keyboard shortcuts

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