Skip to content
Snippets Groups Projects

Resolve "Requesting information from the Controller via NBI takes very long"

All threads resolved!
1 file
+ 4
0
Compare changes
  • Side-by-side
  • Inline
@@ -55,10 +55,14 @@ type LoadedDevice struct {
convertFunc func(LoadedDevice) (Device, error)
}
// SetConverFunction allows to set the LoadedDevice's convert function. This
// function should take a LoadedDevice and returns a Device.
func (ld LoadedDevice) SetConvertFunction(cf func(LoadedDevice) (Device, error)) {
ld.convertFunc = cf
}
// ConvertToDevice calls the LoadedDevice's convert function and converts the
// LoadedDevice into a Device
func (ld LoadedDevice) ConvertToDevice() (Device, error) {
return ld.convertFunc(ld)
}
Loading