added client generator inteface (#2854)

* added client generator inteface
* start router service asynchronously

Signed-off-by: Vardhaman Surana <vardhaman.surana@infracloud.io>
This commit is contained in:
Vardhaman Surana
2023-10-18 18:59:28 +05:30
committed by GitHub
parent c6329ee3db
commit fc97b7609b
6 changed files with 46 additions and 45 deletions
+13 -3
View File
@@ -35,9 +35,19 @@ import (
"github.com/fission/fission/pkg/utils"
)
type ClientGenerator struct {
restConfig *rest.Config
}
type (
ClientGeneratorInterface interface {
GetFissionClient() (versioned.Interface, error)
GetKubernetesClient() (kubernetes.Interface, error)
GetApiExtensionsClient() (apiextensionsclient.Interface, error)
GetMetricsClient() (metricsclient.Interface, error)
GetDynamicClient() (dynamic.Interface, error)
}
ClientGenerator struct {
restConfig *rest.Config
}
)
func (cg *ClientGenerator) getRestConfig() (*rest.Config, error) {
if cg.restConfig != nil {