Go Version
- 1.22.4
RES Protocol Version
- 1.2.3
Release info
This release fixes one bug and adds three new features, apart from generally updating dependencies, Go build versions, and CI workflows, as well as improving test coverage. While the Resgate project has been on ice for a while, it is being actively used by its maintainer in various projects, and will keep getting new updates.
Metrics
We can now get metrics in the OpenMetrics format which may be scraped by systems like Prometheus, by simply setting the metrics port:
resgate --metricsport=8090
The metrics can then be accessed at: http://localhost:8090/metrics
WebSocket header authentication
It is now also possible to set an authentication method for WebSocket connections, that will be called when a WebSocket connection request is received, prior to the connection being established.
resgate --wsheaderauth=authservice.jwtauth
This is similar to --headauth
except it is only for WebSocket connections, and allows seamless authentication of the WebSocket connection using HTTP headers. If both HTTP requests and WebSocket connections uses header authentication, both --headauth
and --wsheadauth
should be set. They may use the same authentication method.
Custom response headers with meta object
Service responses to auth, access, and call requests may now contain meta information such as HTTP status code or HTTP response headers. This allows us to set cookies on WebSocket or HTTP requests, or even to respond with redirects to HTTP requests.
For more information, see: RES Service Protocol - Meta object
Referenced resources not found in client cache
The bug that has been fixed caused Resgate in some specific cases to wrongfully exclude recently unsubscribed resources in its response to the client, causing the client to throw errors because the resource was not found in the client's cache. For more info, see #241 .
Issues
Features
Improvements
- #243 Update javascript example dependencies
- #245 GitHub actions for CI
- #253 Remove Travis
- #247 Update docker to use go v1.22.4
- #257 Increase test coverage
- #260 Update go mod version
Fixes
- #241 Referenced resource not included in response if unsubscribed while getting ready
Contributors
Thanks to the contributors from VoIPGRID, (especially @lmendes86) providing code used as reference for the metrics feature, and the CI workflow updates.