Skip to content
This repository has been archived by the owner on Oct 20, 2020. It is now read-only.
/ scala-srv-dns Public archive

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

License

Notifications You must be signed in to change notification settings

simacan/scala-srv-dns

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.5"
)

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

About

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

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages