proto-thrift

module
v0.0.0-...-16a15a2 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2017 License: BSD-3-Clause

README

proto-thrift

proto-thrift is a plugin of protoc. It reads gRPC service definitions and generates a reverse-proxy server which translates Thrift messages into gRPC.

Installation

To use this software, you must:

  • Install the standard C++ implementation of protocol buffers from https://developers.google.com/protocol-buffers/
  • 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
  • Grab the code from the repository and install the proto package. The simplest way is to run go get -u github.com/google/protobuf/proto github.com/deciphernow/proto-thrift/protoc-gen-thrift. The compiler plugin, protoc-gen-thrift, will be installed in $GOBIN, defaulting to $GOPATH/bin. It must be in your $PATH for the protocol compiler, protoc, to find it.

Usage

To generate Thrift IDL and gRPC service proxy:

$ GENHOME=$GOPATH/src/github.com/deciphernow/proto-thrift
$ THRIFT_PATH="<path where you want Thrift code to go>"
$ INCLUDE="$(dirname "$(which protoc)")/../include"
$ INCLUDE="$INCLUDE:$GENHOME/thrift"
$ protoc --proto_path=./ --proto_path=$INCLUDE --plugin=protoc-gen-custom=protoc-gen-thrift --custom_out=thrift_path=$THRIFT_PATH:. hello.proto 

Then generate Go code from the Thrift IDL:

$ generator hello.thrift $PWD/thrift-build

Directories

Path Synopsis
conformance implements the conformance test subprocess protocol as documented in conformance.proto.
conformance implements the conformance test subprocess protocol as documented in conformance.proto.
conformance_proto
Package conformance is a generated protocol buffer package.
Package conformance is a generated protocol buffer package.
Package descriptor provides functions for obtaining protocol buffer descriptors for generated Go types.
Package descriptor provides functions for obtaining protocol buffer descriptors for generated Go types.
Package hello is a generated protocol buffer package.
Package hello is a generated protocol buffer package.
github.com/golang/protobuf/examples
Package hello is a generated protocol buffer package.
Package hello is a generated protocol buffer package.
Package jsonpb provides marshaling and unmarshaling between protocol buffers and JSON.
Package jsonpb provides marshaling and unmarshaling between protocol buffers and JSON.
jsonpb_test_proto
Package jsonpb is a generated protocol buffer package.
Package jsonpb is a generated protocol buffer package.
Package proto converts data structures to and from the wire format of protocol buffers.
Package proto converts data structures to and from the wire format of protocol buffers.
proto3_proto
Package proto3_proto is a generated protocol buffer package.
Package proto3_proto is a generated protocol buffer package.
protoc-gen-thrift
descriptor
Package descriptor is a generated protocol buffer package.
Package descriptor is a generated protocol buffer package.
generator
The code generator for the plugin for the Google protocol buffer compiler.
The code generator for the plugin for the Google protocol buffer compiler.
grpc
Package grpc outputs gRPC service descriptions in Go code.
Package grpc outputs gRPC service descriptions in Go code.
plugin
Package plugin_go is a generated protocol buffer package.
Package plugin_go is a generated protocol buffer package.
Package ptypes contains code for interacting with well-known types.
Package ptypes contains code for interacting with well-known types.
any
Package any is a generated protocol buffer package.
Package any is a generated protocol buffer package.
duration
Package duration is a generated protocol buffer package.
Package duration is a generated protocol buffer package.
empty
Package empty is a generated protocol buffer package.
Package empty is a generated protocol buffer package.
struct
Package structpb is a generated protocol buffer package.
Package structpb is a generated protocol buffer package.
timestamp
Package timestamp is a generated protocol buffer package.
Package timestamp is a generated protocol buffer package.
wrappers
Package wrappers is a generated protocol buffer package.
Package wrappers is a generated protocol buffer package.
Package thrift is a generated protocol buffer package.
Package thrift is a generated protocol buffer package.

Jump to

Keyboard shortcuts

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