v0.14.0
This Release Includes Breaking Changes
This release includes breaking changes. The changes are introduced in order to extend the framework to add more implementation options for service discovery and distributed lock. In addition, support for go-kit
is dropped.
What's Changed
New Features
- Consul become an optional package. When initialized (
consul.Use()
), Consul is registered withappconfig
as a source of application properties - Vault become an optional package. When initialized (
vault.Use()
), Vault is registered withappconfig
as a source of application properties. - Added
dnssd
for DNS SRV based service lookup.dnssd
also support static service discovery as "fallback" - Added Redis based distributed lock implementation
Breaking Changes
- Breaking change in
discovery
package:- consul backed service discovery is moved to a separate package. To use it,
consulsd
(formally known asdiscoveryinit
) package need to be initialized withconsulsd.Use()
.consul.Use()
is also a prerequisite for using Consul based service discovery - Properties for
consulsd
is relocated to tocloud.discovery.consul
fromcloud.consul.discovery
- consul backed service discovery is moved to a separate package. To use it,
- Breaking change in
integrate/httpclient
package:httpclient.Client.WithService(...)
is changed to take optionalSDOptions
. Options includes default HTTP scheme and context-path, SD error handling and SD selector- The client now supports retry back-off period and custom retry logic
- go-kit interfaces are removed
- Breaking change in
integrate/security
package:- Property
integrate.security.service-name
moved tointegrate.security.endpoints.service-name
- Added properties
integrate.security.endpoints.scheme
andintegrate.security.endpoints.context-path
- Property
- Breaking change due to dropping usage and compatibility support of go-kit:
log.Logger
no longer implements go-kit'sLogger
interface.discovery.Instancer
concrete implementations no longer implement go-kit'ssd.Instancer
interface.web
package interfaces re-organized to remove usage of go-kit's abstraction and server implementation.
- Breaking change due to
dsync
package refactoring:- dsync package is refactored to three packages
dsync
,consuldsync
andredisdsync
dsync.Use()
is removed,consuldsync.Use()
orredisdsync.Use()
should be used instead.- Removed
web.Registrar.RegisterWithLifecycle()
- dsync package is refactored to three packages
Bug Fixes
- Fixed: When using go 1.21 or later, lanai-cli's
init
command would fail if the service's go.mod file contains a replace directive that pointed to a none-existent location. - Fixed: a bug in
make init-cli
when go-lanai is not replaced by a local copy in the go.mod file. - Fixed: a typo causing
data
packages fail to build when CGO_ENABLED=0 - Fixed: a bug in
errorutils
whereerrorutils.CodedError
does not correctly implementerrorutils.NestedError
- Fixed: a bug in bootstrap where
bootstrap.AddOptions()
was actually adding options tobootstrap.Module.PriorityOptions
instead ofbootstrap.Module.Options
- Fixed: a bug where
httpclient
package's error was not well formatted (#408).
Others
- Updated make files in examples to match the latest make file template.
- Updated main README.md and restructured documentation locations.
- Tracing package refactored to reduce unnecessary indirect dependencies. Instrument implementations are moved to their corresponding feature packages.
Full Changelog: v0.13.0...v0.14.0