vertx-lang-scala-docs_2.12 3.4.0 API < Back
 

# Packages

-  package root
  Definition Classes
    root
-  package io
  Definition Classes
    root
-  package vertx
  Definition Classes
    io
-  package scala
  Definition Classes
    vertx
-  package amqpbridge
  Definition Classes
    scala
-  package circuitbreaker
  Definition Classes
    scala
-  package config
  Definition Classes
    scala
-  package core
  Definition Classes
    scala
-  package ext
  Definition Classes
    scala
-  package kafka
  Definition Classes
    scala
-  package mqtt
  Definition Classes
    scala
-  package rabbitmq
  Definition Classes
    scala
-  package redis
  Definition Classes
    scala
-  package servicediscovery
  Definition Classes
    scala
-  package spi
-  package types
- Record
- ServiceDiscovery
- ServiceDiscoveryOptions
- ServiceReference

p

io.vertx.scala

# servicediscovery 

#### package servicediscovery

 
Ordering

1. Alphabetic

Visibility

1. Public
2. All

### Type Members

1.  class Record extends AnyRef

   Describes a `service`.

   Describes a `service`. The record is the only piece of information shared between consumer and provider. It should contains enough metadata to let consumer find the service they want.

2.  class ServiceDiscovery extends AnyRef

   Service Discovery main entry point.

   Service Discovery main entry point.

   The service discovery is an infrastructure that let you publish and find `services`. A `service` is a discoverable functionality. It can be qualified by its type, metadata, and location. So a `service` can be a database, a service proxy, a HTTP endpoint. It does not have to be a vert.x entity, but can be anything. Each service is described by a Record.

   The service discovery implements the interactions defined in the service-oriented computing. And to some extend, also provides the dynamic service-oriented computing interaction. So, application can react to arrival and departure of services.

   A service provider can:

   * publish a service record * un-publish a published record * update the status of a published service (down, out of service...)

   A service consumer can:

   * lookup for services * bind to a selected service (it gets a io.vertx.scala.servicediscovery.ServiceReference) and use it * release the service once the consumer is done with it * listen for arrival, departure and modification of services.

   Consumer would 1) lookup for service record matching their need, 2) retrieve the io.vertx.scala.servicediscovery.ServiceReference that give access to the service, 3) get a service object to access the service, 4) release the service object once done.

   A state above, the central piece of information shared by the providers and consumers are Record.

   Providers and consumers must create their own io.vertx.scala.servicediscovery.ServiceDiscovery instance. These instances are collaborating in background (distributed structure) to keep the set of services in sync.

3.  class ServiceDiscoveryOptions extends AnyRef

   Options to configure the service discovery.

4.  class ServiceReference extends AnyRef

   Once a consumer has chosen a service, it builds a io.vertx.scala.servicediscovery.ServiceReference managing the binding with the chosen service provider.

   Once a consumer has chosen a service, it builds a io.vertx.scala.servicediscovery.ServiceReference managing the binding with the chosen service provider.

   The reference lets the consumer: * access the service (via a proxy or a client) with the io.vertx.scala.servicediscovery.ServiceReference#get method * release the reference - so the binding between the consumer and the provider is removed

### Value Members

1.  object Record
2.  object ServiceDiscovery
3.  object ServiceDiscoveryOptions
4.  object ServiceReference

### Ungrouped