com.gilt.util.net

dns

package dns

Visibility
  1. Public
  2. All

Type Members

  1. class InvalidServiceNameException extends Exception

  2. trait ServiceLookup extends AnyRef

    A thin wrapper around http://www.dnsjava.org/ to make use of DNS SRV records for dynamic server/cluster configuration.

    A thin wrapper around http://www.dnsjava.org/ to make use of DNS SRV records for dynamic server/cluster configuration.

    http://en.wikipedia.org/wiki/SRV_record http://tools.ietf.org/html/rfc2782

    SRV record format: _service._proto.name. TTL class SRV priority weight port target.

    service: the symbolic name of the desired service. proto: the transport protocol of the desired service; this is usually either TCP or UDP. name: the domain name for which this record is valid, ending in a dot. TTL: standard DNS time to live field. class: standard DNS class field (this is always IN). priority: the priority of the target host, lower value means more preferred. weight: A relative weight for records with the same priority. port: the TCP or UDP port on which the service is to be found. target: the canonical hostname of the machine providing the service, ending in a dot.

    SRVRecord(Name name, int dclass, long ttl, int priority, int weight, int port, Name target)

  3. case class ServiceLookupException(serviceName: String, cause: Exception) extends Exception with Product with Serializable

  4. case class ServiceName(name: String) extends Product with Serializable

    Name of the service in a format compatible with our use of DNS SRV record feature.

    Name of the service in a format compatible with our use of DNS SRV record feature. Basically a format-validated String.

    We support 2 use cases:

    • 'Simple' names, intended to represent globally shared services, like shared zookeeper cluster. E.g. 'zookeeper-cluster' or 'kafka-cluster'.
    • Application-specific names, intended to represent services that are name spaced to a particular application domain. E.g. 'mongo.user' would represent default mongo DB service that is 'owned' by a 'user' app. Here, the part before the first '.' is the canonical name of the service, the rest is prepended to the default search domain and used as the domain part.
    See also

    ServiceLookup

  5. case class ServiceRecord(host: InetAddress, port: Int, priority: Int, weight: Int) extends Product with Serializable

    Used to create a canonical host:port connection string to some service or cluster.

    Used to create a canonical host:port connection string to some service or cluster.

    See also

    ServiceLookup

Value Members

  1. object ServiceLookup extends ServiceLookup

  2. object ServiceName extends Serializable

Ungrouped