Skip to content

Coherence Go Client - v2.3.0-rc1

Pre-release
Pre-release
Compare
Choose a tag to compare
@tmiddlet2666 tmiddlet2666 released this 21 May 05:34
· 6 commits to main since this release
a5eb070

Introduction

This is release v2.3.0-rc1 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/[email protected]

Updates / New Features - v2.3.0-rc1

  • 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 and extractors.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 custom EntryProcessor. See Go client examples for more information

Bug Fixes

  • N/A

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

Full Changelog: v2.2.0...v2.3.0-rc1