Uploaded image for project: 'Thrift'
  1. Thrift
  2. THRIFT-4553

are there any plans for add middle-ware support for thrift Go implementation?

    XMLWordPrintableJSON

Details

    • Question
    • Status: Closed
    • Minor
    • Resolution: Information Provided
    • 0.11.0
    • None
    • None
    • None

    Description

      version1:

      provide a function to register middleware, and chain processors all. each function can call `Next` to skip to next function. something like middle-ware implementation in gin[1]

      version2:

      provide two function in TSimpleServer, one for preProcess, one for afterProcess. and call them

      before and after `ok, err := processor.Process(defaultCtx, inputProtocol, outputProtocol)`, so they can use defaultCtx to do something.

       

      middle-ware is useful for something like monitoring micro service, count execution time...etc.

       

      [1]https://github.com/gin-gonic/gin/blob/master/context.go#L104

      Attachments

        Activity

          People

            dcelasun Duru Can Celasun
            gansteed gansteed
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: