go-truss

module
v0.0.0-...-8353322 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2016 License: MIT

README

Truss

Truss handles the painful parts of microservices, 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 the standard C++ implementation of protocol buffers from https://developers.google.com/protocol-buffers/
  2. Of course, install the Go compiler and tools from https://golang.org/. See https://golang.org/doc/install for details or, if you are using gccgo, follow the instructions at https://golang.org/doc/install/gccgo
  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 $GOBIN, defaulting to $GOPATH/bin. It must be in your $PATH for the protocol compiler, protoc, to find it.
  4. Install the gRPC: $ go get -u google.golang.org/grpc
  5. Install Truss with $ go get -u github.com/TuneLab/go-truss/...

Usage

Using Truss is easy. You define your microservice in a protobuf file, and Truss uses that definition to create an entire microservice.

Once you've written the definition of your microservice, use the command $ truss {NAME_OF_PROTO_FILE} to generate your microservice into a directory called service/ within your current directory.

Developing

See DEVELOPING.md for details

Directories

Path Synopsis
Package gendoc is a truss plugin to generate markdown documentation for a protobuf definition file.
Package gendoc is a truss plugin to generate markdown documentation for a protobuf definition file.
doctree
Doctree, which stands for "documentation tree", creates a tree of nodes representing the components of a service defined through Protobuf definition files.
Doctree, which stands for "documentation tree", creates a tree of nodes representing the components of a service defined through Protobuf definition files.
doctree/makedt
Makedt is a package for exposing the creation of a doctree structure.
Makedt is a package for exposing the creation of a doctree structure.
doctree/makedt/googlethirdparty
Package google_api is a generated protocol buffer package.
Package google_api is a generated protocol buffer package.
svcparse
Svcparse, which stands for "service parser" will parse the 'service' declarations within a provided protobuf and associate comments within that file with the various components of the service.
Svcparse, which stands for "service parser" will parse the 'service' declarations within a provided protobuf and associate comments within that file with the various components of the service.
clientarggen
Package clientarggen collects information for templating the code in a truss-generated client which marshals command line flags into message fields for each service.
Package clientarggen collects information for templating the code in a truss-generated client which marshals command line flags into message fields for each service.
httptransport
Package httptransport provides functions and template helpers for templating the http-transport of a go-kit based microservice.
Package httptransport provides functions and template helpers for templating the http-transport of a go-kit based microservice.
template
This file is here to hold the `go generate` command above.
This file is here to hold the `go generate` command above.
Package truss contains the relative file tree data structure that represents the paths and contents of generated files
Package truss contains the relative file tree data structure that represents the paths and contents of generated files
integration_tests
This file is here so that go's tooling does not complain there are no builable gofiles in this directory
This file is here so that go's tooling does not complain there are no builable gofiles in this directory
template
This file is here to hold the `go generate` command above.
This file is here to hold the `go generate` command above.

Jump to

Keyboard shortcuts

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