diff --git a/.idea/libraries/Go_SDK.xml b/.idea/libraries/Go_SDK.xml new file mode 100644 index 0000000..c68ceae --- /dev/null +++ b/.idea/libraries/Go_SDK.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..94a25f7 --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/initializer.go b/initializer.go index 4679644..811c98d 100644 --- a/initializer.go +++ b/initializer.go @@ -1,18 +1,18 @@ package initializer_go import ( - "sync" - cm "loafle.com/overflow/agent_api/config_manager" "google.golang.org/grpc" + cm "loafle.com/overflow/agent_api/config_manager" + "sync" ) var ( - once sync.Once + once sync.Once instance *Initializer ) type Initializer struct { - gconf *cm.GlobalConfig + gconf *cm.GlobalConfig } func Start(ch chan string, conf *cm.GlobalConfig) error { @@ -26,6 +26,15 @@ func Start(ch chan string, conf *cm.GlobalConfig) error { return nil } + +func Stop(res chan bool) { + + GetInstance().stop() + + res <- true +} + + func GetInstance() *Initializer { once.Do(func() { instance = &Initializer{} @@ -47,3 +56,6 @@ func (i *Initializer) getSecretKey() (string, error) { } +func (i *Initializer) stop() { + +} \ No newline at end of file