Skip to content

geomyidia/reverb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

reverb

A gRPC Server API Convenience Wrapper

About

Reverb is cheekily synonymized from the HTTPD package Echo and aims to serve a minimally similar purpose, though for gRPC instead of HTTP.

Example Use

In particular, see the StartgRPCD function below:

package app

import (
  "fmt"

  "github.com/labstack/echo/v4"
  "github.com/geomyidia/reverb"
)

// Application ...
type Application struct {
  Config *cfg.Config
  HTTPD  *echo.Echo
  GRPCD  *reverb.Reverb
}

// StartgRPCD ...
func (a *Application) StartgRPCD() {
  serverOpts := fmt.Sprintf("%s:%d", a.Config.GRPCD.Host, a.Config.GRPCD.Port)
  server := a.GRPCD.Start(serverOpts)
  a.SetupgRPCImplementation(server)
  server.Serve()
}

// Setup for other services, e.g., HTTPD
// ...

// Start all services
func (a *Application) Start() {
  a.StartgRPCD()
  a.StartHTTPD()
  ...
}

About

A gRPC Server API Convenience Wrapper

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages