An open API service providing package, version and dependency metadata of many open source software ecosystems and registries.

Top 5.3% on proxy.golang.org
Top 4.2% dependent packages on proxy.golang.org
Top 2.5% dependent repos on proxy.golang.org
Top 7.4% forks on proxy.golang.org

proxy.golang.org : github.com/scylladb/scylla-cdc-go

Package scyllacdc is a library that helps develop applications that react to changes from Scylla's CDC. It is recommended to get familiar with the Scylla CDC documentation first in order to understand the concepts used in the documentation of scyllacdc: https://docs.scylladb.com/using-scylla/cdc/ The library hides the complexity of reading from CDC log stemming from the need for polling for changes and handling topology changes. It reads changes from CDC logs of selected tables and propagates them to instances of ChangeConsumer - which is an interface that is meant to be implemented by the user. To start working with the library, you first need to implement your own logic for consuming changes. The simplest way to do it is to define a ChangeConsumerFunc which will be called for each change from the CDC log. For example: For any use case more complicated than above, you will need to define a ChangeConsumer and a ChangeConsumerFactory: Next, you need to create and run a scyllacdc.Reader object: The library supports saving progress and restoring from the last saved position. To enable it, you need to do two things: First, you need to modify your consumer to regularly save progress. The consumer receives a *scyllacdc.ProgressReporter object which can be used to save progress at any point in the lifetime of the consumer. The library itself doesn't regularly save progress - it only does it by itself when switching to the next CDC generation. Therefore, the consumer is responsible for saving the progress regularly. Example: Then, you need to specify an appropriate ProgressManager in the configuration. ProgressManager represents a mechanism of saving and restoring progress. You can use the provided implementations (TableBackedProgressManager), or implement it yourself. In the main function: Data from the CDC log is supplied to the ChangeConsumer through Change objects, which can contain multiple ChangeRow objects. A single ChangeRow corresponds to a single, full (all columns included) row from the CDC log.

Registry - Source - Documentation - JSON
purl: pkg:golang/github.com/scylladb/scylla-cdc-go
License: Apache-2.0
Latest release: 8 months ago
First release: about 4 years ago
Namespace: github.com/scylladb
Dependent packages: 2
Dependent repositories: 4
Stars: 30 on GitHub
Forks: 7 on GitHub
See more repository details: repos.ecosyste.ms
Last synced: 29 days ago

    Loading...
    Readme
    Loading...