Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RunChangefeed ¶
func RunChangefeed[F any, X api.DocumentList[F]]( ctx context.Context, log *logrus.Entry, iterator database.DocumentIterator[F, X], changefeedInterval time.Duration, changefeedBatchSize int, responder ChangefeedConsumer[F], stop <-chan struct{}, )
Types ¶
type ChangefeedConsumer ¶
type ChangefeedConsumer[F any] interface { // OnDoc is called with each document returned from the list from Next() OnDoc(F) // OnAllPendingProcessed is when no more pages are returned from Next() OnAllPendingProcessed() // Lock is called before a page is processed Lock() // Unlock is called after a page is processed Unlock() }
Generic interface of a consumer that NewChangefeed will call with documents, completed pages, etc.
type SubscriptionsCache ¶
type SubscriptionsCache interface {
ChangefeedConsumer[*api.SubscriptionDocument]
GetCacheSize() int
GetSubscription(string) (subscriptionInfo, bool)
GetLastProcessed() (time.Time, bool)
WaitForInitialPopulation()
}
Click to show internal directories.
Click to hide internal directories.