lianglong/kong-api-for-hyperf

kong gateway admin api for hyperf

dev-master 2022-02-24 09:25 UTC

This package is auto-updated.

Last update: 2022-09-24 12:51:57 UTC


README

Kong API Gateway for Hyperf - Microservices Management Layer, delivering high performance and reliability.

Compatibility

Currently supported Kong version: 2.x.

Supported services:

  • Service
  • Route
  • Certificate
  • Consumer
  • Plugin
  • Sni
  • Target
  • Upstream

Requires:

  • hyperf/guzzle
  • hyperf/utils

Install

This library can be installed with composer:

composer require lianglong/kong-api-for-hyperf

Usage

$factory = new \lianglong\Kong\ServiceFactory(['base_uri'=>'http://127.0.0.1:8001']);
/** @var \lianglong\Kong\Services\Services $service */
$service = $factory->get('services');
$response = $service->create(
  [
    'name' => $name,
  ]
);
$ret = $response->json();
var_dump($ret);