nytris/dns
最新稳定版本:v0.0.1
Composer 安装命令:
composer create-project nytris/dns
包简介
README 文档
README
Concise ReactPHP DNS config with caching.
Usage
Install this package with Composer:
$ composer require nytris/dns
When using Nytris platform (recommended)
Configure Nytris platform:
nytris.config.php
<?php declare(strict_types=1); use Nytris\Boot\BootConfig; use Nytris\Boot\PlatformConfig; use Nytris\Cache\Adapter\ReactCacheAdapter; use Nytris\Dns\Dns; use React\Socket\Connector; use Symfony\Component\Cache\Adapter\FilesystemAdapter; $bootConfig = new BootConfig(new PlatformConfig(__DIR__ . '/var/cache/nytris/')); $bootConfig->installPackage(new MyNytrisPackage( // Using Nytris Cache & Symfony Cache adapters as an example. connectorFactory: fn (string $cachePath) => new Connector([ 'dns' => (new Dns())->createResolver( new ReactCacheAdapter( new FilesystemAdapter( 'my_cache_key', 0, $cachePath ) ) ), ]) )); return $bootConfig;
统计信息
- 总下载量: 5.13k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-08-27