func newManager(cp common.CredentialProvider) manager.Manager {
	registryProvider := registry.NewDefaultRegistryProvider(cp)
	resolver := manager.NewTypeResolver(registryProvider)
	expander := manager.NewExpander(getServiceURL(*expanderURL, *expanderName), resolver)
	deployer := manager.NewDeployer(getServiceURL(*deployerURL, *deployerName))
	r := repository.NewMapBasedRepository()
	service := registry.NewInmemRegistryService()
	credentialProvider := cp
	return manager.NewManager(expander, deployer, r, registryProvider, service, credentialProvider)
}
Example #2
0
func newManager(cp common.CredentialProvider) manager.Manager {
	service := registry.NewInmemRegistryService()
	registryProvider := registry.NewDefaultRegistryProvider(cp, service)
	resolver := manager.NewTypeResolver(registryProvider, util.DefaultHTTPClient())
	expander := manager.NewExpander(getServiceURL(*expanderURL, *expanderName, expanderPort), resolver)
	deployer := manager.NewDeployer(getServiceURL(*deployerURL, *deployerName, deployerPort))
	address := strings.TrimPrefix(getServiceURL(*mongoAddress, *mongoName, *mongoPort), "https://")
	repository := createRepository(address)
	return manager.NewManager(expander, deployer, repository, registryProvider, service, cp)
}
func newManager() manager.Manager {
	expander := manager.NewExpander(getServiceURL(*expanderURL, *expanderName), manager.NewTypeResolver())
	deployer := manager.NewDeployer(getServiceURL(*deployerURL, *deployerName))
	r := repository.NewMapBasedRepository()
	return manager.NewManager(expander, deployer, r)
}