Truss helps you build go-kit microservices without having to worry about writing or maintaining boilerplate code.
Перейти к файлу
Adam Ryman 67fd294675 Move example to _example for tests
If ./example/ has code non compilable code in it from a truss run, then
go test ./... will exit non 0 from this code failing to build. This is
annoying when testing truss on the example and then trying to rerun the
tests. This fixes it by adding the _ to avoid go's tooling
2016-11-28 05:12:15 -08:00
_example Move example to _example for tests 2016-11-28 05:12:15 -08:00
cmd Update integration test readme 2016-11-22 10:53:08 -08:00
deftree Use all GOPATH's rather than just first 2016-11-16 16:24:14 -08:00
gendoc Move truss config to base /truss path and move main.go to /cmd/truss 2016-11-08 22:39:10 -08:00
gengokit modify template to fix problem with only parts of the generated code recognizing vendored go-kit type 2016-11-22 19:19:12 -08:00
svcdef Use all GOPATH's rather than just first 2016-11-16 16:24:14 -08:00
truss Use all GOPATH's rather than just first 2016-11-16 16:24:14 -08:00
vendor Ignore solaris in vendor/vendor.json per 2016-10-17 11:45:49 -07:00
.gitignore Remove and exclude breaking vendored files 2016-08-01 16:28:33 -07:00
.travis.yml Fix issue #89; cannot use gen .pb.go from multiple services 2016-11-14 16:02:09 -08:00
DEVELOPING.md Polish based on PR comments 2016-10-13 10:43:18 -07:00
Dockerfile Dockerfile cleanup: 2016-09-09 13:56:57 -07:00
LICENSE.md Add license file 2016-08-01 14:40:35 -07:00
Makefile Fix issue #89; cannot use gen .pb.go from multiple services 2016-11-14 16:02:09 -08:00
README.md Move example to _example for tests 2016-11-28 05:12:15 -08:00
USAGE.md Move cli-client handlers to generated directory 2016-11-08 20:28:40 -08:00

README.md

Truss Build Status

Truss handles the painful parts of services, freeing you to focus on the business logic.

Please note that Truss is currently pre-release software, and may change drastically with no notice. There is no versioning, no guarantees, no stability at this time. However, if you want to play around, make suggestions, or submit changes, we welcome issues and pull requests!

Everything all the time forever

Install

Currently, there is no binary distribution of Truss, you must install from source.

To install this software, you must:

  1. Install protocol buffers version 3 or greater. The easiest way is to download a release from the github releases and add the binary to your $PATH. Otherwise install from source.

  2. Of course, install the Go compiler and tools from https://golang.org/. See https://golang.org/doc/install for details.

  3. Install the protoc-gen-go and proto packages for Go. The simplest way is to run

    go get -u github.com/golang/protobuf/{proto,protoc-gen-go}
    

    The compiler plugin, protoc-gen-go, will be installed in $GOPATH/bin. It must be in your $PATH for the protocol compiler, protoc, to find it.

  4. Install google's protobuf/grpc http annotations option. protoc will use these to compile http annotations. To install run:

    go get -u google.golang.org/genproto	
    
  5. Install Truss with

    go get -u github.com/TuneLab/go-truss/...
    

Usage

Using Truss is easy. You define your service with gRPC and protoc buffers, and Truss uses that definition to create an entire service. You can even add http annotations for HTTP 1.1/JSON transport!

Then you open the handlers/server/server_handler.go, add you business logic, and you're good to go.

Here is an example service definition: Echo Service

Try Truss for yourself on Echo Service to see the service that is generated:

truss example/echo.proto

See USAGE.md for more details.

Developing

See DEVELOPING.md for details.