phergie/phergie-irc-plugin-dns
最新稳定版本:4.0.0
Composer 安装命令:
composer require phergie/phergie-irc-plugin-dns
包简介
Phergie plugin for Looking up IP's by hostnames
README 文档
README
Phergie plugin for Looking up IP's by hostnames.
Install
To install via Composer, use the command below, it will automatically detect the latest version and bind it with ~.
composer require phergie/phergie-irc-plugin-dns
See Phergie documentation for more information on installing and enabling plugins.
Configuration
new \Phergie\Plugin\Dns\Plugin([ // All configuration is optional 'dnsServer' => '1.2.3.4', // IP address of a DNS server, defaults to Google's 8.8.8.8 // or 'command' => 'customDns', // command name, defaults to dns // or 'resolver' => new React\Dns\Resolver\Resolver(), // provide your own Resolver instance // defaults to null and is set at first use // (don't use this unless you know what you are doing!) // or 'enableCommand' => false, // enable use access to the dns command ])
Events
This plugin listens on a few events providing the resolver to other plugins that wish to make use of it.
dns.resolve
The dns.resolve event accepts a callback that will be called with a Promise that will resolve once the given hostname has been resolved. (If promises are new to you, be sure to read this.)
$this->emitter->emit('dns.resolve', [function($promise) use ($callback, $that) { $promise->then(function($ip) { echo 'IP for github.com: ' . $ip . PHP_EOL; }); }]);
dns.resolver
The dns.resolver event accepts a callback that will be called once a Resolver instance has been created.
$this->emitter->emit('dns.resolver', [function($resolver) use ($callback, $that) { $resolver->resolve('github.com')->then(function($ip) { echo 'IP for github.com: ' . $ip . PHP_EOL; }); }]);
Tests
To run the unit test suite:
curl -s https://getcomposer.org/installer | php
php composer.phar install
cd tests
../vendor/bin/phpunit
License
Released under the MIT License. See LICENSE.
phergie/phergie-irc-plugin-dns 适用场景与选型建议
phergie/phergie-irc-plugin-dns 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 1.47k 次下载、GitHub Stars 达 1, 最近一次更新时间为 2015 年 08 月 25 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「plugin」 「bot」 「irc」 「react」 「phergie」 「phergieplugin」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 phergie/phergie-irc-plugin-dns 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 phergie/phergie-irc-plugin-dns 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 phergie/phergie-irc-plugin-dns 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
CakePHP 4.x AdminLTE Theme.
Dialogflow php sdk
Small utility to connect with an irker service.
Laravel 5.6 Monolog custom telegram channel
Your self hosted service for twitch web-based overlays and custom bot with Laravel.
Plugin for YOURLS. Default tools to use in some laemmi plugins
统计信息
- 总下载量: 1.47k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 25
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-08-25