github.com/jingruilea/kubeedge@v1.2.0-beta.0.0.20200410162146-4bb8902b3879/edge/pkg/metamanager/config/config.go (about) 1 package config 2 3 import ( 4 "sync" 5 6 "github.com/kubeedge/kubeedge/pkg/apis/componentconfig/edgecore/v1alpha1" 7 ) 8 9 const ( 10 defaultSyncInterval = 60 11 ) 12 13 var Config Configure 14 var once sync.Once 15 16 // Connected stands for whether it is connected 17 // TODO need consider to add lock @kadisi 18 var Connected = false 19 20 type Configure struct { 21 v1alpha1.MetaManager 22 } 23 24 func InitConfigure(m *v1alpha1.MetaManager) { 25 once.Do(func() { 26 Config = Configure{ 27 MetaManager: *m, 28 } 29 }) 30 }