jeyroik/extas-jsonrpc
Composer 安装命令:
composer require jeyroik/extas-jsonrpc
包简介
Extas jsonrpc package
README 文档
README
Description
Extas-compatible JSON RPC server.
install operations
install jsonrpc plugin and default operation
# vendor/bin/extas i
usage out of the box
start server
# php -S 0.0.0.0:8080 -t src/public
make request
# curl -X POST localhost:8080/api/jsonrpc -d '{"id": "request id", "method":"operation.index"}'
spec generation
This package allows generating specs upon to InstallSection-plugins, extended from extas\components\plugins\intsall\InstallSection.
This package allows generating specs upon to InitSection-plugins, extended from extas\components\plugins\init\InitSection.
* - you can reset this prefix (see below).
There is extas-command for spec generation. Command is ready-to-extending, so you can add your own options, using extas-commands-options-notation. See extas.json of the current package for examples.
install command
# vendor/bin/extas i# vendor/bin/extas list- commandjsonrpcshould be listed.
generate specs
# vendor/bin/extas jsonrpc --export-path generated.extas.json
This will generate extas-compatible configuration in ready-to-install format.
So you can install specs by
# vendor/bin/extas i
--export-path
Define path to store generated specs.
- Default:
CWD/specs.extas.json - You can pass relative and absolute path.
CWD - Current Working Directory.
--prefix-jsonrpc-install
Allow setting prefix for plugins searching by install section crawler.
- Default:
Install
--path-jsonrpc-install
Allow setting path for searching plugins by install section crawler.
- Default: current working directory.
--prefix-jsonrpc-doc-comment
Allow setting prefix for classes searching by doc-comment crawler.
- Default:
Install
--path-jsonrpc-doc-comment
Allow setting path for searching classes by doc comment crawler.
- Default: current working directory.
-f --filter
Allow filtering operations names.
- Default:
- Example:
# vendor/bin/extas jsonrpc -f workflowwill generate specs only for operations withworkflowin a name.
-e --only-edge
Sometimes you want to make entity name shorter and use only last word of plugin name.
You can do this with the option -e:
For example, we have plugin name workflow schema.
- Default:
0- generate entity nameworkflow.schema. - With edging:
# vendor/bin/extas jsonrpc -e 1will produce entity nameschema.
specs examples
You can find them here:
resources/create.spec.jsonresources/index.spec.jsonresources/update.spec.jsonresources/delete.spec.json
injection into json-rpc process
Current package provide next stages to allow you to inject into the json-rpc process:
before.run.jsonrpc- before every json-rpc processing.before.run.jsonrpc.<method.name>after.run.jsonrpc.<method.name>after.run.jsonrpc- after every json-rpc processing.
Generators
Package use extas-generators package for getting generators.
You should turn generators on if you want to use one.
You can find ready-to-config default generators configuration in resources/generators.json. Just copy-paste them into your extas.json.
Crawlers
Package use extas-crawlers package for getting crawlers.
You should turn crawlers on if you want to use one.
You can find ready-to-config default crawlers configuration in resources/crawlers.json. Just copy-paste them into your extas.json.
jeyroik/extas-jsonrpc 适用场景与选型建议
jeyroik/extas-jsonrpc 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 648 次下载、GitHub Stars 达 0, 最近一次更新时间为 2020 年 01 月 14 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 jeyroik/extas-jsonrpc 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 jeyroik/extas-jsonrpc 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 648
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 3
- 依赖项目数: 4
- 推荐数: 0
其他信息
- 授权协议: Unknown
- 更新时间: 2020-01-14