jobcloud/php-console-kafka-schema-registry
Composer 安装命令:
composer require jobcloud/php-console-kafka-schema-registry
包简介
Console commands for the Kafka schema registry
README 文档
README
Installation
composer require jobcloud/php-console-kafka-schema-registry
Requirements
- php: ^8.4
Register commands
You can register each command separately like this:
<?php use Symfony\Component\Console\Application; use Jobcloud\SchemaConsole\Command\ListAllSchemasCommand; use Jobcloud\SchemaConsole\SchemaRegistryApi; use GuzzleHttp\Client; $client = new Client( [ 'base_uri' => 'url-to-your-schema-api', //'auth' => ['schema-username', 'schema-password'] ] ); $schemaRegistryApi = new SchemaRegistryApi($client); $console = new Application(); $console->add(new ListAllSchemasCommand($schemaRegistryApi));
or you can also register them over the service provider:
<?php use Jobcloud\SchemaConsole\ServiceProvider\CommandServiceProvider; use Pimple\Container; $container = new Container(); $container->register(new CommandServiceProvider());
Note: To use the service provider you need to set the following in your container:
- either
kafka.schema.registry.clientwhich is the guzzle client or alternativelykafka.schema.registry.url - if you need to use basic authentication you need to set
kafka.schema.registry.usernameandkafka.schema.registry.password
统计信息
- 总下载量: 41.45k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2019-09-23