* refactor backend, implement encrypted store
* refactor in-memory store
* wip
* wip
* wip
* add syncer test
* fix redis expiry
* fix linting issues
* fix test by skipping non-config records
* fix backoff import
* fix init issues
* fix query
* wait for initial sync before starting directory sync
* add type to SyncLatest
* add more log messages, fix deadlock in in-memory store, always return server version from SyncLatest
* update sync types and tests
* add redis tests
* skip macos in github actions
* add comments to proto
* split getBackend into separate methods
* handle errors in initVersion
* return different error for not found vs other errors in get
* use exponential backoff for redis transaction retry
* rename raw to result
* use context instead of close channel
* store type urls as constants in databroker
* use timestampb instead of ptypes
* fix group merging not waiting
* change locked names
* update GetAll to return latest record version
* add method to grpcutil to get the type url for a protobuf type
Currently, we're doing "sync" in databroker server. If we're going to
support multiple databroker servers instance, this mechanism won't work.
This commit moves the "sync" to storage backend, by adding new Watch
method. The Watch method will return a channel for the caller. Everytime
something happens inside the storage, we notify the caller by sending a
message to this channel.
* pkg/storage: add redis storage backend
* pkg/storage/redis: set record create time correctly
* pkg/storage/redis: add docs
* pkg/storage/redis: run test with redis tag only
* pkg/storage/redis: use localhost
* pkg/storage/redis: use 127.0.0.1
* pkg/storage/redis: honor REDIS_URL env
* .github/workflows: add missing config for redis service
* .github/workflows: map redis ports to host
* pkg/storage/redis: use proto marshaler instead of json one
* pkg/storage/redis: use better implementation
By using redis supported datastructure:
- Hash for storing record
- Sorted set for storing by version
- Set for storing deleted ids
List operation will be now performed in O(log(N)+M) instead of O(N) like
previous implementation.
* pkg/storage/redis: add tx to wrap redis transaction
* pkg/storage/redis: set record type in New
* pkg/storage/redis: make sure tx commands appear in right order
* pkg/storage/redis: make deletePermanentAfter as argument
* pkg/storage/redis: make sure version is incremented when deleting
* pkg/storage/redis: fix linter
* pkg/storage/redis: fix cmd construction