fleet-telemetry icon indicating copy to clipboard operation
fleet-telemetry copied to clipboard

telemetry::producer::add close method

Open jordan-bonecutter opened this issue 2 years ago • 0 comments

Description

Most telemetry.Producers manage resources which can be cleaned up. Expose a Close method which allows telemetry.Producers to be closed.

I have also refactored the main function to allow for:

  1. Cleaning up on interrupt (move startServer to separate function)
  2. Testing cleanup functionality (move startServer out of main module)

Fixes # (issue) N/A (Discussed in earlier PR)

Type of change

Please select all options that apply to this change:

  • [x] New feature (non-breaking change which adds functionality)
  • [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • [ ] Bug fix (non-breaking change which fixes an issue)
  • [ ] Documentation update

Checklist:

Confirm you have completed the following steps:

  • [x] My code follows the style of this project.
  • [x] I have performed a self-review of my code.
  • [x] I have made corresponding updates to the documentation.
  • [x] I have added/updated unit tests to cover my changes.
  • [x] I have added/updated integration tests to cover my changes.

jordan-bonecutter avatar Nov 01 '23 02:11 jordan-bonecutter