Skip to content

Releases: blacklane/go-libs

Camunda/v1.0.0: inject context to Camunda subscription handler

01 Feb 07:45
8d17efb
Compare
Choose a tag to compare

This release changes:

  • Inject new "context" from service to Camunda subscription handler
  • this change is not backwards compatible

x/events/v0.2.0

26 Nov 16:14
Compare
Choose a tag to compare

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.
  • 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 as golint was deprecated.
  • Change make rules from compose-* to docker-*
  • Fix linting issues
  • Add TODOs

tracking/v0.3.0

26 Nov 16:04
Compare
Choose a tag to compare

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 a middleware module ("lib") later on

Internal changes:

otel/v0.1.0

26 Nov 16:58
Compare
Choose a tag to compare

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

26 Nov 17:06
Compare
Choose a tag to compare

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

26 Nov 16:24
Compare
Choose a tag to compare

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

09 Nov 14:34
c7d7b3a
Compare
Choose a tag to compare

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

15 Mar 10:57
a670603
Compare
Choose a tag to compare

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

01 Feb 16:46
880cd4d
Compare
Choose a tag to compare
  • Fix events middlewate to always update the logger in the context

logger/v0.5.0

01 Feb 15:01
a919f21
Compare
Choose a tag to compare
  • change time field format to include milliseconds