@Test public void checkHeath() throws Exception { RegistryService dhub = registryRepository.getByName(null); Assert.assertTrue(dhub.checkHealth()); RegistryService pdhub = registryRepository.getByName("codeabovelab"); Assert.assertTrue(pdhub.checkHealth()); RegistryService awshub = registryRepository.getByName(AWS_REGISTRY); Assert.assertTrue(awshub.checkHealth()); RegistryService privHub = registryRepository.getByName(PRIVATE_REGISTRY); Assert.assertTrue(privHub.checkHealth()); }
public RegistryService getByName(String registryName) { RegistryService service = null; if (registryName != null && !Objects.equals(defaultRegistry.getConfig().getName(), registryName)) { service = map.get(registryName); } if (service == null) { service = defaultRegistry; } return service; }
RegistryRepository implements SupportSearch { public RegistryService getByName(String registryName) { RegistryService service = null; if (registryName != null && !Objects.equals(defaultRegistry.getConfig().getName(), registryName)) { service = map.get(registryName); } if (service == null) { service = defaultRegistry; } return service; } }
RegistryRepository implements SupportSearch { public RegistryService getByName(String registryName) { RegistryService service = null; if (registryName != null && !Objects.equals(defaultRegistry.getConfig().getName(), registryName)) { service = map.get(registryName); } if (service == null) { service = defaultRegistry; } return service; } RegistryRepository(KvMapperFactory mapperFactory,
                              DockerHubRegistry defaultRegistry,
                              RegistryFactory factory,
                              @Qualifier(RegistryEvent.BUS) MessageBus<RegistryEvent> eventBus); }
RegistryRepository implements SupportSearch { public RegistryService getByName(String registryName) { RegistryService service = null; if (registryName != null && !Objects.equals(defaultRegistry.getConfig().getName(), registryName)) { service = map.get(registryName); } if (service == null) { service = defaultRegistry; } return service; } RegistryRepository(KvMapperFactory mapperFactory,
                              DockerHubRegistry defaultRegistry,
                              RegistryFactory factory,
                              @Qualifier(RegistryEvent.BUS) MessageBus<RegistryEvent> eventBus); void init(List<RegistryConfig> configs); void register(RegistryService registryService); void unRegister(String name); List<ImageCatalog> getCatalog(Collection<String> names); Collection<String> getAvailableRegistries(); String resolveRegistryNameByImageName(String imageName); RegistryService getRegistryByImageName(String imageName); RegistryService getByName(String registryName); @Override SearchResult search(String query, final int page, final int size); }
RegistryRepository implements SupportSearch { public RegistryService getByName(String registryName) { RegistryService service = null; if (registryName != null && !Objects.equals(defaultRegistry.getConfig().getName(), registryName)) { service = map.get(registryName); } if (service == null) { service = defaultRegistry; } return service; } RegistryRepository(KvMapperFactory mapperFactory,
                              DockerHubRegistry defaultRegistry,
                              RegistryFactory factory,
                              @Qualifier(RegistryEvent.BUS) MessageBus<RegistryEvent> eventBus); void init(List<RegistryConfig> configs); void register(RegistryService registryService); void unRegister(String name); List<ImageCatalog> getCatalog(Collection<String> names); Collection<String> getAvailableRegistries(); String resolveRegistryNameByImageName(String imageName); RegistryService getRegistryByImageName(String imageName); RegistryService getByName(String registryName); @Override SearchResult search(String query, final int page, final int size);  }