Giter VIP home page Giter VIP logo

go-trace-thrift's Introduction

go-trace-thrift

自定义 thrift 服务

Feature

针对对请求链路有追踪需求的应用,不必显式定义在每个 IDL 中 trace 参数,或是兼容 thrift 的 Generation 自动生成。 思路是:依赖于请求头,启动服务时,提前注册 struct, 解析请求参数时反解,重置 stream, struct 只做单次请求生命周期 内的存储 storage (协程安全的)。详见 example/

Install

$ go get github.com/8090Lambert/go-trace-thrift

Usage

import (
	"github.com/8090Lambert/tracer_thrift/example/api/echo"
	"github.com/8090Lambert/tracer_thrift/example/api/trace"
	"github.com/8090Lambert/tracer_thrift/service/rpc"
)

func NewServer() {
	rpc.NewServer(echo.NewEchoProcessor(
		EchoServerInterface{}),     // process handler
		new(trace.Trace),           // 约定好的 trace struct
	).Run()
}

go-trace-thrift's People

Contributors

8090lambert avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.