clay

module
v2.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2018 License: MIT

README

clay

Minimal server platform for gRPC and REST+Swagger APIs

Using clay you can automatically spin up HTTP handlers for your gRPC server with complete Swagger defs with a few lines of code.

Project is vgo-friendly, you can adopt it using new versioning system.

Why?

There's an excellent grpc-gateway proxy generator, but it requires you to spin up (at least) one proxy instance in addition to your services. clay allows you to serve HTTP traffic by server instances themselves for easier debugging/testing.

Requirements

Since new Semantic Import Versioning is used, you are required to use Go1.9.7+ or Go1.10.3+

How?

Check out an example server for a quick start, or dive into step-by-step docs for a full guide.

Flexibility

clay.Server is easily extendable, as you can pass any options gRPC server can use, but if it's not extendable enough then you can use the .GetDescription() method of your implementation to register the service in your own custom server (see ServiceDesc). clay/server vs own server for more info regarding BYOS.

Directories

Path Synopsis
cmd
Package log is DEPRECATED, left for backwards compatibility.
Package log is DEPRECATED, left for backwards compatibility.
log
middlewares/mwgrpc
Package mwgrpc provides common gRPC middlewares.
Package mwgrpc provides common gRPC middlewares.
httpruntime/httpmw
Package httpmw provides middlewares that are automatically used by the generated code.
Package httpmw provides middlewares that are automatically used by the generated code.
middlewares/mwcommon
Package mwcommon is DEPRECATED, left for backwards compatibility.
Package mwcommon is DEPRECATED, left for backwards compatibility.
middlewares/mwgrpc
Package mwgrpc is DEPRECATED, left for backwards compatibility.
Package mwgrpc is DEPRECATED, left for backwards compatibility.
middlewares/mwhttp
Package mwhttp is DEPRECATED, left for backwards compatibility.
Package mwhttp is DEPRECATED, left for backwards compatibility.
server
Package server is DEPRECATED, left for backwards compatibility.
Package server is DEPRECATED, left for backwards compatibility.

Jump to

Keyboard shortcuts

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