1 Star 0 Fork 0

向林 / kiri-consul

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
Namespaces.php 919 Bytes
一键复制 编辑 原始数据 按行查看 历史
向林 提交于 2022-01-11 16:02 . Revert "改名"
<?php
namespace Kiri\Consul;
use Kiri\Client;
class Namespaces extends AbstractConsul
{
/**
* @param $data
* @return Client
*/
public function put($data): Client
{
return $this->request('/v1/namespace', self::PUT, $data);
}
/**
* @param $name
* @param $data
* @return Client
*/
public function update($name, $data): Client
{
return $this->request('/v1/namespace/' . $name, self::PUT, $data);
}
/**
* @param $key
* @return Client
*/
public function get($key): Client
{
return $this->request('/v1/namespace/' . $key, self::GET);
}
/**
* @return Client
*/
public function list(): Client
{
return $this->request('/v1/namespaces', self::GET);
}
/**
* @param $key
* @return Client
*/
public function delete($key): Client
{
return $this->request('/v1/namespace/' . $key, self::DELETE);
}
}
PHP
1
https://gitee.com/dreamwithouttrace/kiri-consul.git
git@gitee.com:dreamwithouttrace/kiri-consul.git
dreamwithouttrace
kiri-consul
kiri-consul
master

搜索帮助