mirror of
https://github.com/pomerium/pomerium.git
synced 2025-05-16 02:27:40 +02:00
databroker: add support for syncing by type (#3412)
* databroker: add support for syncing by type * add type url, fix query
This commit is contained in:
parent
2487e9af20
commit
45a29ea879
17 changed files with 163 additions and 125 deletions
|
@ -210,6 +210,7 @@ func (backend *Backend) SetOptions(
|
|||
// Sync syncs the records.
|
||||
func (backend *Backend) Sync(
|
||||
ctx context.Context,
|
||||
recordType string,
|
||||
serverVersion, recordVersion uint64,
|
||||
) (storage.RecordStream, error) {
|
||||
// the original ctx will be used for the stream, this ctx used for pre-stream calls
|
||||
|
@ -224,7 +225,7 @@ func (backend *Backend) Sync(
|
|||
return nil, storage.ErrInvalidServerVersion
|
||||
}
|
||||
|
||||
return newChangedRecordStream(ctx, backend, recordVersion), nil
|
||||
return newChangedRecordStream(ctx, backend, recordType, recordVersion), nil
|
||||
}
|
||||
|
||||
// SyncLatest syncs the latest version of each record.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue