init opClient

This commit is contained in:
pengcong06
2020-05-12 23:26:38 +08:00
parent d358d9ab1a
commit 070aa863fb
2 changed files with 11 additions and 1 deletions

View File

@@ -177,6 +177,14 @@ func (s *ServerRunOptions) NewAPIServer(stopCh <-chan struct{}) (*apiserver.APIS
}
}
if s.OpenPitrixOptions != nil {
opClient, err := openpitrix.NewClient(s.OpenPitrixOptions)
if err != nil {
return nil, err
}
apiServer.OpenpitrixClient = opClient
}
server := &http.Server{
Addr: fmt.Sprintf(":%d", s.GenericServerRunOptions.InsecurePort),
}