Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Preq is a latency and fault tolerance library for Laravel && Lumen, inspired by Netflix’s Hystrix and upwork/phystrix

License

NotificationsYou must be signed in to change notification settings

llnut/preq-laravel

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status

About Preq

Preq is a latency and fault tolerance library for Laravel && Lumen, inspired by Netflix’s Hystrix andupwork/phystrix

Installation

Require this package with composer:

composer require per3evere/preq --dev

Add ServiceProvider

Laravel

add this to the providers array inconfig/app.php

Per3evere\Preq\PreqServiceProvider::class

Lumen

add this inbootstrap/app.php

$app->register(Per3evere\Preq\PreqServiceProvider::class);

Usage

Create service command file

namespaceApp\Services;usePer3evere\Preq\AbstractCommand;class Exampleextends AbstractCommand{/**     * 同步执行命令.     *     * @return void     */publicfunctionrun()    {return'run!';    }/**     * 异步执行命令.     *     * @return \Guzzlehttp\Promise\Promise;     */publicfunctionrunAsync()    {// 返回注意返回类型.    }}

execute it

$command =app('preq')->getCommand(\App\Services\Example::class);// 同步执行命令echo$command->execute();// 异步执行命令$command->queue();

About

Preq is a latency and fault tolerance library for Laravel && Lumen, inspired by Netflix’s Hystrix and upwork/phystrix

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP100.0%

[8]ページ先頭

©2009-2025 Movatter.jp