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

Golang: Interceptor for processor handler

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 0.13.0
    • Fix Version/s: None
    • Component/s: Go - Compiler
    • Labels:
      None

      Description

      Hi.

      Thank for this great project. But I think we can introduce some improvements which will be are useful for other developers.

      Inspired by https://github.com/grpc/grpc-go/blob/master/examples/features/interceptor/server/main.go.

      Interceptors give opportunities for:

      • Logging input request and response
      • We can log panic situation and return TApplicationException to client instead of EOF.
      • We can intercept request and do stuff like some validation, etc.

      Usage example: https://gist.github.com/voodoo-dn/6af6cf54b8145cc3d4d87d888c4bf907

      Pull request: https://github.com/apache/thrift/pull/1992

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                voodoo Serhii
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 8.5h
                  8.5h