github.com/safing/portbase@v0.19.5/updater/export.go (about)

     1  package updater
     2  
     3  // Export exports the list of resources.
     4  func (reg *ResourceRegistry) Export() map[string]*Resource {
     5  	reg.RLock()
     6  	defer reg.RUnlock()
     7  
     8  	// copy the map
     9  	copiedResources := make(map[string]*Resource)
    10  	for key, val := range reg.resources {
    11  		copiedResources[key] = val.Export()
    12  	}
    13  
    14  	return copiedResources
    15  }