You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

24 lines
442 B

package config
import (
"git.aiterp.net/lucifer/new-server/internal/drivers"
"git.aiterp.net/lucifer/new-server/internal/drivers/nanoleaf"
"git.aiterp.net/lucifer/new-server/models"
"sync"
)
var dp models.DriverProvider
var dpMutex sync.Mutex
func DriverProvider() models.DriverProvider {
dpMutex.Lock()
defer dpMutex.Unlock()
if dp == nil {
dp = drivers.DriverMap{
models.DTNanoLeaf: &nanoleaf.Driver{},
}
}
return dp
}