Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rustedbones/scout
Zeroconf for scala (multicast DNS service discovery)
https://github.com/rustedbones/scout
cats-effect dns-sd scala zeroconf
Last synced: 26 days ago
JSON representation
Zeroconf for scala (multicast DNS service discovery)
- Host: GitHub
- URL: https://github.com/rustedbones/scout
- Owner: RustedBones
- License: apache-2.0
- Created: 2020-05-23T14:41:17.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2023-05-05T22:59:43.000Z (over 1 year ago)
- Last Synced: 2023-05-25T13:06:21.291Z (over 1 year ago)
- Topics: cats-effect, dns-sd, scala, zeroconf
- Language: Scala
- Homepage:
- Size: 63.5 KB
- Stars: 3
- Watchers: 0
- Forks: 1
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# scout
[![Continuous Integration](https://github.com/RustedBones/scout/actions/workflows/ci.yml/badge.svg)](https://github.com/RustedBones/scout/actions/workflows/ci.yml)
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/fr.davit/scout_3/badge.svg)](https://maven-badges.herokuapp.com/maven-central/fr.davit/scout_3)
[![Software License](https://img.shields.io/badge/license-Apache%202-brightgreen.svg?style=flat)](LICENSE)
[![Scala Steward badge](https://img.shields.io/badge/Scala_Steward-helping-blue.svg?style=flat&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAQCAMAAAARSr4IAAAAVFBMVEUAAACHjojlOy5NWlrKzcYRKjGFjIbp293YycuLa3pYY2LSqql4f3pCUFTgSjNodYRmcXUsPD/NTTbjRS+2jomhgnzNc223cGvZS0HaSD0XLjbaSjElhIr+AAAAAXRSTlMAQObYZgAAAHlJREFUCNdNyosOwyAIhWHAQS1Vt7a77/3fcxxdmv0xwmckutAR1nkm4ggbyEcg/wWmlGLDAA3oL50xi6fk5ffZ3E2E3QfZDCcCN2YtbEWZt+Drc6u6rlqv7Uk0LdKqqr5rk2UCRXOk0vmQKGfc94nOJyQjouF9H/wCc9gECEYfONoAAAAASUVORK5CYII=)](https://scala-steward.org)Zeroconf for scala (multicast DNS service discovery)
## Versions
| Version | Release date | fs2 version | Scala versions |
|---------|--------------| ---------- | ------------------- |
| `0.2.1` | 2023-01-10 | `3.4.0` | `3.2.1` |
| `0.2.0` | 2022-12-27 | `3.4.0` | `3.2.1` |
| `0.1.0` | 2021-01-13 | `2.5.0` | `2.13.4`, `2.12.12` |## Getting scout
```sbt
libraryDependencies += "fr.davit" %% "scout" % ""
```## Zeroconf
```scala
import cats.effect.{IO, IOApp}
import fr.davit.scout.Zeroconf
import fr.davit.taxonomy.model.DnsMessage
import fr.davit.taxonomy.scodec.DnsCodec
import scodec.Codecimport java.net.InetAddress
import scala.concurrent.duration*object App extends IOApp.Simple:
// service definition
val service = Zeroconf.Service("ipp", "tcp")// Scanning for service instances
val instances = Zeroconf
.scan[IO](service)
.interruptAfter(50.seconds)
.compile
.toList
.unsafeRunSync()// instance definition
val instance = Zeroconf.Instance(
service = service,
name = "Ed’s Party Mix",
port = 1010,
target = "eds-musicbox",
information = Map("codec" -> "ogg"),
addresses = Seq(InetAddress.getByName("169.254.150.84")) // use local address when left empty
)// Registering an instance
Zeroconf.register[IO](instance)
```