cybertec-postgresql / pgwatch

🔬PGWATCH: PostgreSQL metrics monitor/dashboard
BSD 3-Clause "New" or "Revised" License
73 stars 16 forks source link

refactor: Updated Receiver to Handler for Sync Metric functionality. … #536

Closed destrex271 closed 2 months ago

destrex271 commented 2 months ago

References the current upstream version of pgwatch3_rpc_receivers where we have separated both the receiver and the sync metric handler.

A new type called Handler now handles the Sync Metric calls in the receivers: https://github.com/destrex271/pgwatch3_rpc_server/blob/1cb1f44d237ce5817831194c9285c20397277fc2/cmd/csv_receiver/main.go#L32

coveralls commented 2 months ago

Pull Request Test Coverage Report for Build 10617031936

Details


Files with Coverage Reduction New Missed Lines %
internal/log/log_broker_hook.go 6 59.3%
<!-- Total: 6 -->
Totals Coverage Status
Change from base Build 10613049886: -0.1%
Covered Lines: 1380
Relevant Lines: 4863

💛 - Coveralls
pashagolub commented 2 months ago

No, we will keep it Receiver. I don't see any point in renaming things. It is the same object handling all functions, at the moment UpdateMeasurements and SyncMetrics. If RPC sink has two different objects dealing with it, it's the choice of the author. pgwatch considers RPC sink as a single interface supporting all (at the moment 2) methods.

destrex271 commented 2 months ago

No, we will keep it Receiver. I don't see any point in renaming things. It is the same object handling all functions, at the moment UpdateMeasurements and SyncMetrics. If RPC sink has two different objects dealing with it, it's the choice of the author. pgwatch considers RPC sink as a single interface supporting all (at the moment 2) methods.

Ok! I'll make the required changes in receivers repo