wait for initial sync to complete before starting control plane (#1636)

This commit is contained in:
Caleb Doxsey 2020-11-30 15:45:12 -07:00 committed by GitHub
parent e5d55f300e
commit 3f7777f7e0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 49 additions and 6 deletions

View file

@ -420,6 +420,11 @@ func (dbd DataBrokerData) Clear(typeURL string) {
delete(dbd, typeURL)
}
// Count returns the number of entries for the given type URL.
func (dbd DataBrokerData) Count(typeURL string) int {
return len(dbd[typeURL])
}
// Get gets a record from the DataBrokerData.
func (dbd DataBrokerData) Get(typeURL, id string) interface{} {
m, ok := dbd[typeURL]