Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var (
ErrOutOfSync = errors.New("out of sync with changelog. invalidate caches please.")
)
Functions ¶
This section is empty.
Types ¶
type FilteredIterator ¶ added in v0.0.8
type FilteredIterator struct {
// contains filtered or unexported fields
}
func NewFilteredIterator ¶ added in v0.0.8
func NewFilteredIterator(ctx context.Context, changelogPath, family, table string, opts ...IteratorOpt) (*FilteredIterator, error)
NewFilteredIterator returns a new iterator that looks for changes to the specified family and table in the background and then exposes those changes through the Next method. Make sure to Close() the iterator when you are done using it.
If ErrOutOfSync is returned, that means that the iterator likely could not keep up with the changelog. Please invalidate any caches dependent on this iterator.
If a different error is returned, it's not really known at this time the best way to deal with it. It's possible that it could be a change in the changelog json schema, or something more temporary. Best response for now will be to log and instrument the error, and then just invalidate the cache the same way you would with ErrOutOfSync. As time goes on, we'll know a little bit better how to operate this under real-world conditions.
func (*FilteredIterator) Close ¶ added in v0.0.8
func (i *FilteredIterator) Close() error
type Iterator ¶
type Iterator struct {
// contains filtered or unexported fields
}
func NewIterator ¶
NewIterator returns a new iterator that looks for changes in the background and then exposes those changes through the Next method. Make sure to Close() the iterator when you are done using it.
If ErrOutOfSync is returned, that means that the iterator likely could not keep up with the changelog. Please invalidate any caches dependent on this iterator.
If a different error is returned, it's not really known at this time the best way to deal with it. It's possible that it could be a change in the changelog json schema, or something more temporary. Best response for now will be to log and instrument the error, and then just invalidate the cache the same way you would with ErrOutOfSync. As time goes on, we'll know a little bit better how to operate this under real-world conditions.
type IteratorOpt ¶
type IteratorOpt func(i *Iterator)