承接 sroze/discoverd-client 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

sroze/discoverd-client

最新稳定版本:0.1.0

Composer 安装命令:

composer require sroze/discoverd-client

包简介

A PHP client for Flynn's Discoverd.

README 文档

README

This PHP library is a PHP client for Flynn Discoverd API which is based on a custom RPC server that supports JSON.

Installation

Require the package sroze/discoverd-client in your composer.json file and update dependencies:

{
    "require": {
        "sroze/discoverd-client": "~0.1.0"
    }
}

Usage

Note: The client is able to automatically detect the Discoverd address based on the environment if your application is running on Flynn.

<?php

use SRIO\Discoverd\Client;

// Create the Discoverd client
$client = new Client();

// Get informations about the service named "pg"
$serviceName = 'pg';
$result = $client->subscribe($serviceName);

// You can also call any method on RPC server
$client->call('Agent.Register', array(
    'Name' => 'anyservice',
    'Addr' => '1.2.3.4:5678'
));

统计信息

  • 总下载量: 49
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 4
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 3
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2014-11-20