mirror of
https://github.com/pomerium/pomerium.git
synced 2025-05-31 09:57:17 +02:00
databroker: add options for maximum capacity (#2095)
* databroker: add options * implement redis * add trace for enforce options
This commit is contained in:
parent
b3216ae854
commit
636b3d6846
14 changed files with 1085 additions and 419 deletions
|
@ -93,6 +93,10 @@ func (e *encryptedBackend) GetAll(ctx context.Context) ([]*databroker.Record, ui
|
|||
return records, version, nil
|
||||
}
|
||||
|
||||
func (e *encryptedBackend) GetOptions(ctx context.Context, recordType string) (*databroker.Options, error) {
|
||||
return e.underlying.GetOptions(ctx, recordType)
|
||||
}
|
||||
|
||||
func (e *encryptedBackend) Put(ctx context.Context, record *databroker.Record) error {
|
||||
encrypted, err := e.encrypt(record.GetData())
|
||||
if err != nil {
|
||||
|
@ -112,6 +116,10 @@ func (e *encryptedBackend) Put(ctx context.Context, record *databroker.Record) e
|
|||
return nil
|
||||
}
|
||||
|
||||
func (e *encryptedBackend) SetOptions(ctx context.Context, recordType string, options *databroker.Options) error {
|
||||
return e.underlying.SetOptions(ctx, recordType, options)
|
||||
}
|
||||
|
||||
func (e *encryptedBackend) Sync(ctx context.Context, version uint64) (RecordStream, error) {
|
||||
stream, err := e.underlying.Sync(ctx, version)
|
||||
if err != nil {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue