Skip to content
This repository has been archived by the owner on Mar 30, 2021. It is now read-only.

roleypoly/gripkit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gripkit

gRPC go + web server toolkit. not a replacement but a wrapper to initialize grpc + grpc-web in a single shot.

$ go get -u github.com/roleypoly/gripkit

API

Basic usage is

gk := gripkit.Create(
  // gripkit.WithHTTPOptions(gripkit.HTTPOptions{ Addr: "", TLSCertFile: "", TLSKeyFile: "" }), // HTTP(S) server settings.
  // gripkit.WithGrpcWeb( /* add grpcweb.Options... */ ), // turns on gRPC-Web, options optional.
  // gripkit.WithOptions( /* add grpc.Options... */ ), // adds gRPC options
)

proto.RegisterGreeterService(gk.Server, greeterService) // setup gRPC services based on gk.Server.

err := gk.Serve() // starts HTTP(S) server. If TLSCertFile/TLSKeyFile isn't set, will use HTTP, otherwise HTTPS.
if err != nil {
  panic(err)
}

About

gRPC go + web server toolkit

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages