Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add code and scheme generation #20

Merged
merged 10 commits into from
Feb 29, 2024
Merged

Add code and scheme generation #20

merged 10 commits into from
Feb 29, 2024

Commits on Feb 28, 2024

  1. Add code and scheme generation

    Problem:
    - Ensure the Attributes method of Exprotable interface are generated
    automatically for the telemetry data types.
    - Ensure the avro scheme (.avdl) is generated automatically for the
    telemetry data types.
    
    Solution:
    - Add generator tool in cmd/generator that generates code (Attributes
    method) and the scheme.
    - Generator can be used in //go:generate annotations in go source files.
    - Generator has "generator" build tag so that it is not included into
    the telemetry library by default.
    - Generator uses golang.org/x/tools/go/packages to parse source files.
    
    Testing:
    - Unit tests of parsing.
    - Unit tests of code and scheme generation - ensuring non-zero output.
    - Unit tests of generated code in cmd/generator/tests package
    - Manual validation of the generated scheme
      (cmd/generator/tests/data.avdl) using Apache Avro IDL Scheme Support
      IntelliJ plugin.
    
    CLOSES - #18
    
    Co-authored-by: Saylor Berman <s.berman@f5.com>
    Co-authored-by: Ciara Stacke <c.stacke@f5.com>
    3 people committed Feb 28, 2024
    Configuration menu
    Copy the full SHA
    530a4fb View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    9f2926e View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    78c2dbf View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    020a0cc View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    32abe88 View commit details
    Browse the repository at this point in the history
  6. Shorten function signatures

    pleshakov committed Feb 28, 2024
    Configuration menu
    Copy the full SHA
    5094646 View commit details
    Browse the repository at this point in the history
  7. Fix comment

    pleshakov committed Feb 28, 2024
    Configuration menu
    Copy the full SHA
    9a4d13d View commit details
    Browse the repository at this point in the history
  8. Data2 -> AnotherData

    pleshakov committed Feb 28, 2024
    Configuration menu
    Copy the full SHA
    f676004 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    05d1255 View commit details
    Browse the repository at this point in the history
  10. Fix a bug when parsing a struct in the github.com/nginxinc/telemetry-…

    …exporter/pkg/telemetry package
    pleshakov committed Feb 28, 2024
    Configuration menu
    Copy the full SHA
    86bf656 View commit details
    Browse the repository at this point in the history