scala-srv-dns


License

License

Categories

Categories

Scala Languages
GroupId

GroupId

com.gilt
ArtifactId

ArtifactId

scala-srv-dns_2.11
Last Version

Last Version

0.0.7
Release Date

Release Date

Type

Type

jar
Description

Description

scala-srv-dns
scala-srv-dns
Project URL

Project URL

https://github.com/gilt/scala-srv-dns
Project Organization

Project Organization

com.gilt
Source Code Management

Source Code Management

https://github.com/gilt/scala-srv-dns.git

Download scala-srv-dns_2.11

How to add to project

<!-- https://jarcasting.com/artifacts/com.gilt/scala-srv-dns_2.11/ -->
<dependency>
    <groupId>com.gilt</groupId>
    <artifactId>scala-srv-dns_2.11</artifactId>
    <version>0.0.7</version>
</dependency>
// https://jarcasting.com/artifacts/com.gilt/scala-srv-dns_2.11/
implementation 'com.gilt:scala-srv-dns_2.11:0.0.7'
// https://jarcasting.com/artifacts/com.gilt/scala-srv-dns_2.11/
implementation ("com.gilt:scala-srv-dns_2.11:0.0.7")
'com.gilt:scala-srv-dns_2.11:jar:0.0.7'
<dependency org="com.gilt" name="scala-srv-dns_2.11" rev="0.0.7">
  <artifact name="scala-srv-dns_2.11" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.gilt', module='scala-srv-dns_2.11', version='0.0.7')
)
libraryDependencies += "com.gilt" % "scala-srv-dns_2.11" % "0.0.7"
[com.gilt/scala-srv-dns_2.11 "0.0.7"]

Dependencies

compile (3)

Group / Artifact Type Version
org.scala-lang : scala-library jar 2.11.8
dnsjava : dnsjava jar 2.1.6
org.slf4j : slf4j-api jar 1.7.21

test (2)

Group / Artifact Type Version
org.specs2 : specs2-core_2.11 jar 3.8.6
org.specs2 : specs2-junit_2.11 jar 3.8.6

Project Modules

There are no modules declared in this project.

scala-srv-dns

Scala convenience wrapper around org.xbill.DNS for SRV record lookups.

Usage

Add a dependency to build.sbt:

libraryDependencies ++= Seq(
  ...
  "com.gilt" %% "scala-srv-dns" % "0.0.7"
)

Lookup records:

E.g. public record: 'sip' service at 'sip.voice.google.com'

# sbt
> console
scala> import com.gilt.util.net.dns._
scala> import com.gilt.util.net._

scala> ServiceLookup.lookup("sip.sip.voice.google.com.", TransportProtocol.UDP)
res0: Seq[com.gilt.util.net.dns.ServiceRecord] = ArrayBuffer(ServiceRecord(sip-anycast-1.voice.google.com./216.239.32.1,5060,10,1), ServiceRecord(sip-anycast-2.voice.google.com./216.239.32.2,5060,20,1))

With

search something.gilt.com google.com

in

/etc/resolv.conf

same example becomes

scala> ServiceLookup.lookup("sip.sip.voice", TransportProtocol.UDP)
res0: Seq[com.gilt.util.net.dns.ServiceRecord] = ArrayBuffer(ServiceRecord(sip-anycast-1.voice.google.com./216.239.32.1,5060,10,1), ServiceRecord(sip-anycast-2.voice.google.com./216.239.32.2,5060,20,1))

Development

OSSHR Guide

Using Sonatype

SBT/PGP

com.gilt

Gilt Tech

Versions

Version
0.0.7
0.0.6
0.0.5
0.0.4