PHPackages                             orlo/dns-hostname-expansion - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. orlo/dns-hostname-expansion

ActiveLibrary

orlo/dns-hostname-expansion
===========================

may perform dns lookup + expansion of hosts

1.0(1y ago)03.1k↓31.6%proprietaryPHPPHP ^8.2

Since Dec 4Pushed 1y ago2 watchersCompare

[ Source](https://github.com/orlo/dns-hostname-expansion)[ Packagist](https://packagist.org/packages/orlo/dns-hostname-expansion)[ RSS](/packages/orlo-dns-hostname-expansion/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (3)Versions (2)Used By (0)

TL;DR ?
=======

[](#tldr-)

ElasticSearch (for example) needs a list of hosts to talk to, for instance :

-
-  etc

This allows you to have a single DNS record (e.g. in Route53) which responds with multiple A records, which then get formatted into an appropriate list, e.g

- DNS record: elasticsearch.test.org resolves to 1.2.3.4, 1.2.3.5, 1.2.4.6
- Becomes: , ,

The prefix + suffix used in decoration are configurable and could be omitted.

In the event DNS lookup fails, we fall back to returning the passed in host - e.g.

Usage
=====

[](#usage)

- composer require orlo/dns-hostname-expansion
- ...

```
