Codota Logo
KubernetesServiceImporter.<init>
Code IndexAdd Codota to your IDE (free)

How to use
io.vertx.servicediscovery.kubernetes.KubernetesServiceImporter
constructor

Best Java code snippets using io.vertx.servicediscovery.kubernetes.KubernetesServiceImporter.<init> (Showing top 7 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
DateTime d =
  • Codota Iconnew DateTime()
  • Codota IconDateTimeFormatter formatter;String text;formatter.parseDateTime(text)
  • Codota IconObject instant;new DateTime(instant)
  • Smart code suggestions by Codota
}
origin: FroMage/redpipe

ServiceDiscovery discovery = ServiceDiscovery.create(globals.getVertx());
if(new File("/var/run/secrets/kubernetes.io/serviceaccount/token").exists())
  discovery.getDelegate().registerServiceImporter(new KubernetesServiceImporter(), new JsonObject());
globals.setGlobal(ServiceDiscovery.class, discovery);
origin: io.vertx/vertx-service-discovery-bridge-kubernetes

@Test
public void testInitialRetrieval(TestContext tc) {
 Async async = tc.async();
 ServiceDiscovery discovery = ServiceDiscovery.create(vertx, new ServiceDiscoveryOptions().setAutoRegistrationOfImporters(false));
 discovery.registerServiceImporter(new KubernetesServiceImporter(), config().copy().put("namespace", "default"),
  ar -> {
   if (ar.failed()) {
    tc.fail(ar.cause());
   } else {
    discovery.getRecords(s -> true, res -> {
     if (res.failed()) {
      tc.fail(res.cause());
     } else {
      tc.assertEquals(2, res.result().size());
      async.complete();
     }
    });
   }
  });
}
origin: vert-x3/vertx-service-discovery

@Test
public void testInitialRetrieval(TestContext tc) {
 Async async = tc.async();
 ServiceDiscovery discovery = ServiceDiscovery.create(vertx, new ServiceDiscoveryOptions().setAutoRegistrationOfImporters(false));
 discovery.registerServiceImporter(new KubernetesServiceImporter(), config().copy().put("namespace", "default"),
  ar -> {
   if (ar.failed()) {
    tc.fail(ar.cause());
   } else {
    discovery.getRecords(s -> true, res -> {
     if (res.failed()) {
      tc.fail(res.cause());
     } else {
      tc.assertEquals(2, res.result().size());
      async.complete();
     }
    });
   }
  });
}
origin: vert-x3/vertx-service-discovery

/**
 * Reproduce issue https://github.com/vert-x3/vertx-service-discovery/issues/96.
 */
@Test
public void testWatchWithDeletion() {
 AtomicBoolean done = new AtomicBoolean();
 ServiceDiscovery discovery = ServiceDiscovery.create(vertx, new ServiceDiscoveryOptions().setAutoRegistrationOfImporters(false));
 discovery.registerServiceImporter(new KubernetesServiceImporter(), config().copy().put("namespace", "issue96"),
  ar -> done.set(ar.succeeded()));
 await().untilAtomic(done, is(true));
 await().until(() -> {
  List<Record> records = getRecordsBlocking(discovery);
  try {
   assertThatListDoesNotContain(records, "hello-minikube");
   return true;
  } catch (Throwable e) {
   return false;
  }
 });
}
origin: io.vertx/vertx-service-discovery-bridge-kubernetes

/**
 * Reproduce issue https://github.com/vert-x3/vertx-service-discovery/issues/96.
 */
@Test
public void testWatchWithDeletion() {
 AtomicBoolean done = new AtomicBoolean();
 ServiceDiscovery discovery = ServiceDiscovery.create(vertx, new ServiceDiscoveryOptions().setAutoRegistrationOfImporters(false));
 discovery.registerServiceImporter(new KubernetesServiceImporter(), config().copy().put("namespace", "issue96"),
  ar -> done.set(ar.succeeded()));
 await().untilAtomic(done, is(true));
 await().until(() -> {
  List<Record> records = getRecordsBlocking(discovery);
  try {
   assertThatListDoesNotContain(records, "hello-minikube");
   return true;
  } catch (Throwable e) {
   return false;
  }
 });
}
origin: io.vertx/vertx-service-discovery-bridge-kubernetes

@Test
public void testWatch() {
 AtomicBoolean done = new AtomicBoolean();
 ServiceDiscovery discovery = ServiceDiscovery.create(vertx, new ServiceDiscoveryOptions().setAutoRegistrationOfImporters(false));
 discovery.registerServiceImporter(new KubernetesServiceImporter(), config().copy().put("namespace", "default"),
  ar -> done.set(ar.succeeded()));
 await().untilAtomic(done, is(true));
 await().until(() -> {
  List<Record> records = getRecordsBlocking(discovery);
  try {
   assertThatListContains(records, "service3");
   assertThatListDoesNotContain(records, "my-service");
   assertThatListContains(records, "my-http-service");
   return true;
  } catch (Throwable e) {
   return false;
  }
 });
}
origin: vert-x3/vertx-service-discovery

@Test
public void testWatch() {
 AtomicBoolean done = new AtomicBoolean();
 ServiceDiscovery discovery = ServiceDiscovery.create(vertx, new ServiceDiscoveryOptions().setAutoRegistrationOfImporters(false));
 discovery.registerServiceImporter(new KubernetesServiceImporter(), config().copy().put("namespace", "default"),
  ar -> done.set(ar.succeeded()));
 await().untilAtomic(done, is(true));
 await().until(() -> {
  List<Record> records = getRecordsBlocking(discovery);
  try {
   assertThatListContains(records, "service3");
   assertThatListDoesNotContain(records, "my-service");
   assertThatListContains(records, "my-http-service");
   return true;
  } catch (Throwable e) {
   return false;
  }
 });
}
io.vertx.servicediscovery.kubernetesKubernetesServiceImporter<init>

Popular methods of KubernetesServiceImporter

  • createRecord
  • discoveryType
  • addRecordIfNotContained
  • areTheSameService
  • getNamespaceOrDefault
  • getToken
  • isExternalService
  • isTrue
  • manageHttpService
  • manageUnknownService
  • onChunk
  • publishRecord
  • onChunk,
  • publishRecord,
  • removeRecordIfContained,
  • replaceRecordIfContained,
  • unpublishRecord,
  • watch

Popular in Java

  • Making http post requests using okhttp
  • getSupportFragmentManager (FragmentActivity)
  • putExtra (Intent)
  • addToBackStack (FragmentTransaction)
  • UnknownHostException (java.net)
    Thrown when a hostname can not be resolved.
  • Date (java.util)
    A specific moment in time, with millisecond precision. Values typically come from System#currentTime
  • Iterator (java.util)
    An iterator over a collection. Iterator takes the place of Enumeration in the Java Collections Frame
  • Collectors (java.util.stream)
  • Filter (javax.servlet)
    A filter is an object that performs filtering tasks on either the request to a resource (a servlet o
  • JFrame (javax.swing)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now