Releases: blacklane/go-libs
Camunda/v1.0.0: inject context to Camunda subscription handler
This release changes:
- Inject new "context" from service to Camunda subscription handler
- this change is not backwards compatible
x/events/v0.2.0
x/events: refactor, improvements, fixes and add support to OTel
Changes and fixes:
- Use go 1.17
- Update docs.
- Update errors.
- Kafka consumer:
- Add default case to consumer "loop". It sends an error to the registered error handler.
- Ignores when the kafka consumer.Poll return
nil
. - Shutdown: if the context deadline is exceeded before the consumer handlers finish, it immediately returns an error and does not close the underlying kafka consumer.
- improve tests
- Integrate OTel (OpenTelemetry)
- events.Header implements
go.opentelemetry.io/otel/propagation.TextMapCarrier
.
- events.Header implements
- Refactor examples. Make the examples a Go module.
Internal changes:
- Update docker image used on drone.
- Update docker base image pining alpine 3.13 as 3.14 has got a bug.
- Use
revive
asgolint
was deprecated. - Change make rules from
compose-*
todocker-*
- Fix linting issues
- Add TODOs
tracking/v0.3.0
tracking: refactor to remove dependencies on other go-libs modules
THIS RELEASE CONTAINS BREAKING CHANGES
Refactor the module to be as small as possible and to do not have dependencies on other go-libs modules.
The middleware package was removed and it'll be replaced by the middleware
Go module (a.k.a lib), which is introduced on the last PR of this refactor.
Breaking changes:
- Remove the
middleware
package. It'll be replaced by amiddleware
module ("lib") later on
Internal changes:
- Remove the
internal/constants
package. - Use
revive
asgolint
was deprecated.
otel/v0.1.0
otel: add a module providing support and middleware for OpenTelemetry
The otel
is a module to easily setup OTel (OpenTelemetry). It does the necessary initializations and provides middleware for HTTP and Events handlers creating a span for the handler and adding it to the context so the otel API can be used to further instrument the application.
middleware/v0.1.0
middleware: add a module to provide middleware for HTTP and Events
Created the middleware
module to provide easy-to-use middleware for HTTP and Events handler.
It creates middleware.HTTP and middleware.Events which add the following middleware in the correct order:
- Adds a tracking ID to the context, either from the incoming headers or creates a new one.
- Adds a logger to the context.
- Request or Events logger (produces a log entry at the end of the handler).
- OpenTelemetry middleware. Creates a span for the handler and adds the span to the context.
The HTTP/Events tracking ID middleware from go-libs/tracking was moved to this module.
There is also a middleware.HTTPFunc, a helper function to use ordinary functions instead of http.Handler as middleware.HTTP requires.
Check the docs and the examples for more details.
logger/v0.6.0
logger: fix HTTPRequestLogger, tidy up and refactor
Fixes:
- fix HTTPRequestLogger to log with error level if an error happens
Internal changes:
- replace golint by revive
- use go 1.17
- remove unused constants
- tidy up log fields to only the essential, really used ones
- creates a prettyJSONWriter for use on examples and tests
- fix linter issues
- update docs
- remove go-libs/tracking middleware from examples
camunda/v0.0.1
camunda: add camunda module, a wrapper for the Camunda API
This release adds a library for interacting with Camunda via the Camunda API. It supports starting process instances, sending messages and updating variables, subscribing to external task queues and basic authentication.
x/events/v0.1.0
This release introduces implementation changes which, although backward compatible, may affect the performance
Ensure processing events in the order they are consumed:
- ensure events are processed in the order they are consumed. Order is maintained for events with the same Key, when using OrderByEventKey, or no ordering when using OrderByNotSpecified (it's the default behaviour)
- handlers are run sequentially for each event, but events are processed in parallel
- noOpLocker implementation for OrderByNotSpecified
Docker/compose improvements:
- uses environment variable COMPOSE_PROJECT_NAME to separate compose projects per each drone build
- remove port binding to host as it may cause problem during drone builds
- improve Dockerfile to better utilize build cache
logger/v0.5.1
- Fix events middlewate to always update the logger in the context
logger/v0.5.0
- change time field format to include milliseconds