mirror of
https://github.com/pomerium/pomerium.git
synced 2025-08-03 00:40:25 +02:00
fix databroker restart versioning, handle missing sessions (#1145)
* fix databroker restart versioning, handle missing sessions * send empty server version to detect change * only rebuild if there are updated records
This commit is contained in:
parent
a5e8abd6af
commit
557aef2a33
7 changed files with 53 additions and 62 deletions
|
@ -402,6 +402,11 @@ func getDenyVar(vars rego.Vars) []Result {
|
|||
// DataBrokerData stores the data broker data by type => id => record
|
||||
type DataBrokerData map[string]map[string]interface{}
|
||||
|
||||
// Clear removes all the data for the given type URL from the databroekr data.
|
||||
func (dbd DataBrokerData) Clear(typeURL string) {
|
||||
delete(dbd, typeURL)
|
||||
}
|
||||
|
||||
// Get gets a record from the DataBrokerData.
|
||||
func (dbd DataBrokerData) Get(typeURL, id string) interface{} {
|
||||
m, ok := dbd[typeURL]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue