postgres: registry support (#3454)

This commit is contained in:
Caleb Doxsey 2022-07-13 09:14:47 -06:00 committed by GitHub
parent ca8db7b619
commit 24a9d627cd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 436 additions and 36 deletions

View file

@ -104,7 +104,7 @@ func newChangedRecordStream(
recordType: recordType,
recordVersion: recordVersion,
ticker: time.NewTicker(watchPollInterval),
changed: backend.onChange.Bind(),
changed: backend.onRecordChange.Bind(),
}
stream.ctx, stream.cancel = contextutil.Merge(ctx, backend.closeCtx)
return stream
@ -113,7 +113,7 @@ func newChangedRecordStream(
func (stream *changedRecordStream) Close() error {
stream.cancel()
stream.ticker.Stop()
stream.backend.onChange.Unbind(stream.changed)
stream.backend.onRecordChange.Unbind(stream.changed)
return nil
}