Zeroconf

fr.davit.scout.Zeroconf$
object Zeroconf

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Concise view

Type members

Classlikes

final case class Instance(service: Service, name: String, port: Int, target: String, information: Map[String, String], addresses: Seq[InetAddress])

Instance of a service

Instance of a service

Attributes

addresses

Instance ip addresses. When left empty, local address will be used

information

Instance information

name

Instance name of the service, intended to be human readable

port

Instance port for the service

service

Service definition

target

Instance host name

Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
final case class Service(application: String, transport: String, domain: String)

Service to be discovered by DNS-SD

Service to be discovered by DNS-SD

Attributes

application

Application type (eg tftp, printer)

domain

Domain where the service can be found. Defaults to 'local'

transport

Transport type (eq tcp, udp)

Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any

Value members

Concrete methods

def register[F[_] : Network](instance: Instance, interface: Option[NetworkInterface], ttl: FiniteDuration): Stream[F, Unit]

Register a Service Instance to be discovered with DNS-SD

Register a Service Instance to be discovered with DNS-SD

Attributes

instance

Instance to be discovered

interface

Network interface. Will register to all available network interface otherwise

ttl

Time to live of the DNS records

def scan[F[_] : Network](service: Service, interface: Option[NetworkInterface], nextDelay: FiniteDuration => FiniteDuration): Stream[F, Instance]

Periodically scans for Instance of the desired Service.

Periodically scans for Instance of the desired Service.

Attributes

interface

Network interface. Will scan all available network interfaces otherwise

nextDelay

Applied to the previous delay to compute the next, e.g. to implement exponential backoff

service

Service definition

Returns:

Stream of Instance