mirror of
https://github.com/pomerium/pomerium.git
synced 2025-06-02 19:04:14 +02:00
wait for initial sync to complete before starting control plane (#1636)
This commit is contained in:
parent
e5d55f300e
commit
3f7777f7e0
4 changed files with 49 additions and 6 deletions
|
@ -27,6 +27,8 @@ type Authorize struct {
|
|||
|
||||
dataBrokerDataLock sync.RWMutex
|
||||
dataBrokerData evaluator.DataBrokerData
|
||||
|
||||
dataBrokerInitialSync map[string]chan struct{}
|
||||
}
|
||||
|
||||
// New validates and creates a new Authorize service from a set of config options.
|
||||
|
@ -36,6 +38,10 @@ func New(cfg *config.Config) (*Authorize, error) {
|
|||
store: evaluator.NewStore(),
|
||||
templates: template.Must(frontend.NewTemplates()),
|
||||
dataBrokerData: make(evaluator.DataBrokerData),
|
||||
dataBrokerInitialSync: map[string]chan struct{}{
|
||||
"type.googleapis.com/directory.Group": make(chan struct{}, 1),
|
||||
"type.googleapis.com/directory.User": make(chan struct{}, 1),
|
||||
},
|
||||
}
|
||||
|
||||
state, err := newAuthorizeStateFromConfig(cfg, a.store)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue