plgd-dev / go-coap

Implementation of CoAP Server & Client in Go
https://coap.technology
Apache License 2.0
446 stars 116 forks source link

Add Request Monitoring Feature to CoAP Connection #511

Closed jkralik closed 9 months ago

jkralik commented 9 months ago

This pull request introduces a new feature to the CoAP connection module - Request Monitoring. The WithRequestMonitor function has been implemented to enable request monitoring for the connection. This function is called for each CoAP message received from the peer before it is processed.

Details of the Feature:

This new feature enhances the flexibility and control developers have over the CoAP connection behavior. Please review the changes and provide feedback.

jkralik commented 9 months ago

@jeffwelder-ellenbytech I have updated the code as we wanted to merge it. Additionally, I will add some tests there.

codecov-commenter commented 9 months ago

Codecov Report

Attention: 33 lines in your changes are missing coverage. Please review.

Comparison is base (ce37a93) 73.60% compared to head (cb7e95c) 73.80%.

Files Patch % Lines
options/commonOptions.go 42.30% 15 Missing :warning:
udp/client/conn.go 75.00% 7 Missing and 1 partial :warning:
tcp/client/conn.go 69.56% 6 Missing and 1 partial :warning:
tcp/client/session.go 72.72% 2 Missing and 1 partial :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #511 +/- ## ========================================== + Coverage 73.60% 73.80% +0.19% ========================================== Files 71 71 Lines 5729 5844 +115 ========================================== + Hits 4217 4313 +96 - Misses 1122 1139 +17 - Partials 390 392 +2 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

JeffWelder commented 9 months ago

@jkralik Great, I pulled the latest commit into my project to test, and it works as expected. :)

sonarcloud[bot] commented 9 months ago

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

84.0% 84.0% Coverage
0.4% 0.4% Duplication