PHPackages                             huangdijia/jet-client - 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. [HTTP &amp; Networking](/categories/http)
4. /
5. huangdijia/jet-client

ActiveLibrary[HTTP &amp; Networking](/categories/http)

huangdijia/jet-client
=====================

Hyperf jet client

2.2.9(4y ago)84.7k1MITPHPPHP 5.3.\*|5.4.\*|5.5.\*|5.6.\*|7.0.\*

Since Nov 9Pushed 4y ago2 watchersCompare

[ Source](https://github.com/huangdijia/jet-client)[ Packagist](https://packagist.org/packages/huangdijia/jet-client)[ RSS](/packages/huangdijia-jet-client/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (35)Used By (0)

Hyperf jet client
=================

[](#hyperf-jet-client)

[![Latest Test](https://github.com/huangdijia/jet-client/workflows/tests/badge.svg)](https://github.com/huangdijia/jet-client/actions)[![Latest Stable Version](https://camo.githubusercontent.com/c94306236d1c1ede0485aa7e1d24f7fca6be063b843e79496cf178e08f881074/68747470733a2f2f706f7365722e707567782e6f72672f6875616e6764696a69612f6a65742d636c69656e742f76657273696f6e2e706e67)](https://packagist.org/packages/huangdijia/jet-client)[![Total Downloads](https://camo.githubusercontent.com/b3eca33542775b00f64caf47d33be6c5984b8bac606d724d9b95deb096fc02b1/68747470733a2f2f706f7365722e707567782e6f72672f6875616e6764696a69612f6a65742d636c69656e742f642f746f74616c2e706e67)](https://packagist.org/packages/huangdijia/jet-client)[![GitHub license](https://camo.githubusercontent.com/7a424e64fd6f843e592263121a064d7895766609549eb557cee80bb17d050953/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6875616e6764696a69612f6a65742d636c69656e74)](https://github.com/huangdijia/jet-client)

New repository:

Installation
------------

[](#installation)

### Composer

[](#composer)

```
composer require "huangdijia/jet-client:^2.0"
```

Quickstart
----------

[](#quickstart)

### Register with metadata

[](#register-with-metadata)

```
use Huangdijia\Jet\ServiceManager;
use Huangdijia\Jet\Registry\ConsulRegistry;
use Huangdijia\Jet\Transporter\GuzzleHttpTransporter;

ServiceManager::register('CalculatorService', [
    // register with transporter
    ServiceManager::TRANSPORTER => new GuzzleHttpTransporter('127.0.0.1', 9502),
    // or register with registry
    ServiceManager::REGISTRY => new ConsulRegistry(['uri' => 'http://127.0.0.1:8500']),
]);
```

### Auto register services by registry

[](#auto-register-services-by-registry)

```
use Huangdijia\Jet\ServiceManager;
use Huangdijia\Jet\Registry\ConsulRegistry;

$registry = new ConsulRegistry(['uri' => 'http://127.0.0.1:8500']);
$registry->register('CalculatorService'); // register a service
$registry->register(['CalculatorService', 'CalculatorService2']); // register some services
$registry->register(); // register all service
```

### Register default registry

[](#register-default-registry)

```
use Huangdijia\Jet\RegistryManager;
use Huangdijia\Jet\Registry\ConsulRegistry;

RegistryManager::register(RegistryManager::DEFAULT, new ConsulRegistry(['uri' => $uri, 'timeout' => 1]));
```

Call RPC method
---------------

[](#call-rpc-method)

### Call by ClientFactory

[](#call-by-clientfactory)

```
use Huangdijia\Jet\ClientFactory;

$client = ClientFactory::create('CalculatorService');
var_dump($client->add(1, 20));
```

### Call by custom client

[](#call-by-custom-client)

```
use Huangdijia\Jet\Client;
use Huangdijia\Jet\Transporter\GuzzleHttpTransporter;
use Huangdijia\Jet\Registry\ConsulRegistry;

/**
 * @method int add(int $a, int $b)
 */
class CalculatorService extends Client
{
    public function __construct($service = 'CalculatorService', $transporter = null, $packer = null, $dataFormatter = null, $pathGenerator = null, $tries = null)
    {
        // Custom transporter
        $transporter = new GuzzleHttpTransporter('127.0.0.1', 9502);

        // Or get tranporter by registry
        $registry    = new ConsulRegistry(['uri' => 'http://127.0.0.1:8500']);
        $transporter = $registry->getTransporter($service);

        parent::__construct($service, $transporter, $packer, $dataFormatter, $pathGenerator, $tries);
    }
}

$service = new CalculatorService;
var_dump($service->add(3, 10));
```

### Call by custom facade

[](#call-by-custom-facade)

```
use Huangdijia\Jet\Facade;
use Huangdijia\Jet\ClientFactory;

/**
 * @method static int add(int $a, int $b)
 */
class Calculator extends Facade
{
    protected static function getFacadeAccessor()
    {
        // return ClientFactory::create('CalculatorService');
        return 'CalculatorService';
    }
}

var_dump(Calculator::add(rand(0, 100), rand(0, 100)));
```

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity26

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~8 days

Recently: every ~0 days

Total

34

Last Release

1746d ago

Major Versions

1.2.2 → 2.2.32020-12-29

1.2.3 → 2.2.42021-01-21

1.2.4 → 2.2.52021-01-21

1.2.5 → 2.2.62021-07-29

1.2.6 → 2.2.72021-07-29

PHP version history (3 changes)2.0.0PHP &gt;=7.0

1.0.0PHP 5.3.\*|5.4.\*|5.5.\*|5.6.\*

1.0.7PHP 5.3.\*|5.4.\*|5.5.\*|5.6.\*|7.0.\*

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/8337659?v=4)[Deeka Wong](/maintainers/huangdijia)[@huangdijia](https://github.com/huangdijia)

---

Top Contributors

[![huangdijia](https://avatars.githubusercontent.com/u/8337659?v=4)](https://github.com/huangdijia "huangdijia (6 commits)")

### Embed Badge

![Health badge](/badges/huangdijia-jet-client/health.svg)

```
[![Health](https://phpackages.com/badges/huangdijia-jet-client/health.svg)](https://phpackages.com/packages/huangdijia-jet-client)
```

###  Alternatives

[friendsofsymfony/rest-bundle

This Bundle provides various tools to rapidly develop RESTful API's with Symfony

2.8k73.3M318](/packages/friendsofsymfony-rest-bundle)[php-http/discovery

Finds and installs PSR-7, PSR-17, PSR-18 and HTTPlug implementations

1.3k309.5M1.2k](/packages/php-http-discovery)[nyholm/psr7

A fast PHP7 implementation of PSR-7

1.3k235.4M2.4k](/packages/nyholm-psr7)[pusher/pusher-php-server

Library for interacting with the Pusher REST API

1.5k94.8M292](/packages/pusher-pusher-php-server)[spatie/crawler

Crawl all internal links found on a website

2.8k16.3M52](/packages/spatie-crawler)[react/http

Event-driven, streaming HTTP client and server implementation for ReactPHP

78126.4M414](/packages/react-http)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
