Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/metaverse/truss
Truss helps you build go-kit microservices without having to worry about writing or maintaining boilerplate code.
https://github.com/metaverse/truss
cli code-generation go-kit golang
Last synced: about 1 month ago
JSON representation
Truss helps you build go-kit microservices without having to worry about writing or maintaining boilerplate code.
- Host: GitHub
- URL: https://github.com/metaverse/truss
- Owner: metaverse
- License: other
- Created: 2016-06-13T18:18:25.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2024-05-01T15:04:19.000Z (8 months ago)
- Last Synced: 2024-11-14T14:47:17.816Z (about 1 month ago)
- Topics: cli, code-generation, go-kit, golang
- Language: Go
- Homepage:
- Size: 15.9 MB
- Stars: 737
- Watchers: 34
- Forks: 144
- Open Issues: 48
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Truss ![Build Status](https://github.com/metaverse/truss/workflows/Go/badge.svg?branch=master)
Truss handles the painful parts of services, freeing you to focus on the
business logic.![Everything all the time forever](http://i.imgur.com/FtvVeBG.jpg)
## Install
Currently, there is no binary distribution of Truss, you must install from
source.To install this software, you must:
1. Install protoc 3 or newer. The easiest way is to
download a release from [github](https://github.com/google/protobuf/releases)
and add to `$PATH`.
Otherwise [install from source.](https://github.com/google/protobuf)
1. Install Truss with```
go get -u -d github.com/metaverse/truss
cd $GOPATH/src/github.com/metaverse/truss
make dependencies
make
```
On Windows, do the following instead:
```
go get -u -d github.com/metaverse/truss
cd %GOPATH%/src/github.com/metaverse/truss
wininstall.bat
```## Usage
Using Truss is easy. You define your service with [gRPC](http://www.grpc.io/)
and [protoc buffers](https://developers.google.com/protocol-buffers/docs/proto3),
and Truss uses that definition to create an entire service. You can even
add [http annotations](
https://github.com/googleapis/googleapis/blob/928a151b2f871b4239b7707e1bb59258df3fe10a/google/api/http.proto#L36)
for HTTP 1.1/JSON transport!Then you open the `handlers/handlers.go`,
add you business logic, and you're good to go.Here is an example service definition: [Echo Service](./_example/echo.proto)
Try Truss for yourself on Echo Service to see the service that is generated:
```
truss _example/echo.proto
```See [USAGE.md](./USAGE.md) and [TUTORIAL.md](./TUTORIAL.md) for more details.
## Developing
See [DEVELOPING.md](./DEVELOPING.md) for details.