Compile Thrift Support Golang

Source: Internet
Author: User
This is a creation in Article, where the information may have evolved or changed.

This article has been a long time ago, and I do not know how the new version of Thrift

Thrift is a cross-language service deployment framework that defines RPC interfaces and data types through an intermediate language (IDL, Interface Definition Language), and then generates code in different languages via a compiler (currently supports C++,java, Python, PHP, Ruby, Erlang, Perl, Haskell, C #, Cocoa, Smalltalk, and OCaml), and the generated code is responsible for the implementation of the RPC protocol layer and the Transport layer.

Thrift Version: 0.9.2

When compiling support for Golang, the package address that relies on gomock in Gomock,makefile is Google code (outside the wall) and is changed to GitHub.

Thrift-0.9.2/test/go/makefile

559         #GOPATH=`pwd` $(GO) get code.google.com/p/gomock/gomock560         GOPATH=`pwd` $(GO) get github.com/rafrombrc/gomock/gomock579         #GOPATH=`pwd` $(GO) install code.google.com/p/gomock/mockgen580         GOPATH=`pwd` $(GO) install github.com/rafrombrc/gomock/mockgen

Thrift-0.9.2/test/go/src/common/mock_handler.go

25 import (26         //gomock "code.google.com/p/gomock/gomock"27         gomock "github.com/rafrombrc/gomock/gomock"28         thrifttest "gen/thrifttest"29 )

Thrift Some references:

Frame Description: http://dongxicheng.org/search-engine/thrift-framework-intro/

User guide: http://dongxicheng.org/search-engine/thrift-guide/

RPC Programming: http://dongxicheng.org/search-engine/thrift-rpc/

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.