Introduction
This is release v2.3.0 of the Coherence Go Client, an API for accessing Coherence via a native Go client.
Requirements
- Coherence CE 22.06.4+, 14.1.2+, 24.03+, or Coherence 14.1.1.2206.4+, 14.1.2.0 Commercial edition with a configured gRPCProxy. (Always ensure you are using the latest Coherence available patch.)
- Go 1.23.+
NOTE: Due to CVE's in core Go packages (golang.org/x/net in particular), the minimum Go version for v2.1.0+ is now 1.23. If you wish to use a go version < 1.12, you can use V2.0.0 of the client.
go get github.com/oracle/coherence-go-client/v2@latest
Updates / New Features - v2.3.0
- Add the
EntrySetFilterWithComparator
function which allows sorting of results using a comparator, when retrieving entry set when using a filter - Added the
extractors.Comparator
interface andextractors.ExtractorComparator
function to support the above. - Example:
age := extractors.Extract[int]("age") fmt.Println("Retrieve the people between the age of 17 and 21 and order by age ascending") ch := coherence.EntrySetFilterWithComparator(ctx, namedMap, filters.Between(age, 17, 21), extractors.ExtractorComparator(age, true)) for result := range ch { if result.Err != nil { panic(result.Err) } fmt.Printf("Key: %v, Value: %s\n", result.Key, result.Value.String()) }
Note: This feature is only available when connecting to Coherence server versions CE 25.03+ and commercial 14.1.2.0+.
Note: the entries are sorted internally on the gRPC proxy to avoid excessive memory usage, but you need to be careful when running this operation against NamedCaches with large number of entries.
Examples
- Added a new example to show using a custom
Comparator
and customEntryProcessor
. See Go client examples for more information
Bug Fixes
- Harden the reconenction logic when retrieving streamed data via various EntrySet*, Values* and Keys* operations
Upgrading from v1.2.2
If you were previously using v1.2.2 then you will need to update your import statements to specify:
"github.com/oracle/coherence-go-client/v2/coherence"
instead of
"github.com/oracle/coherence-go-client/coherence"
Breaking Changes
- N/A
What's Changed
- Update various deps by @tmiddlet2666 in #126
- Initial EntrySetFilterWithComparator by @tmiddlet2666 in #127
- Increase retries and display http status code for curl by @tmiddlet2666 in #128
- Minor examples README update by @tmiddlet2666 in #129
- Add additional test and clarification for channels doc by @tmiddlet2666 in #130
- Add additional kind tests by @tmiddlet2666 in #131
- Update Coherence versions by @tmiddlet2666 in #132
- Update go grpc version/protoc-gen-go by @tmiddlet2666 in #133
- Fix CI/CD badge by @tmiddlet2666 in #134
- Release queue stream manager when closing session by @vasac in #135
- Minor code update / set release to v2.3.0 by @tmiddlet2666 in #136
New Contributors
Full Changelog: v2.2.0...v2.3.0