Exemplo n.º 1
0
 /**
  * @param string $key
  * @param array $options
  *
  * @return mixed|ResponseInterface
  */
 public function delete($key, array $options = [])
 {
     $params = ['query' => OptionsResolver::resolve($options, ['dc', 'recurse'])];
     return $this->client->put('v1/kv/' . $key, $params);
 }
Exemplo n.º 2
0
 /**
  * @param string $checkId
  * @param array $options
  *
  * @return mixed|ResponseInterface
  */
 public function failCheck($checkId, array $options = [])
 {
     $params = ['query' => OptionsResolver::resolve($options, ['note'])];
     return $this->client->put('/v1/agent/check/fail/' . $checkId, $params);
 }
Exemplo n.º 3
0
 /**
  * @param $state
  * @param array $options
  *
  * @return mixed|ResponseInterface
  */
 public function state($state, array $options = [])
 {
     $params = ['query' => OptionsResolver::resolve($options, ['dc'])];
     return $this->client->get('/v1/health/state/' . $state, $params);
 }
Exemplo n.º 4
0
 /**
  * @param string $service
  * @param array $options
  *
  * @return mixed|ResponseInterface
  */
 public function service($service, array $options = [])
 {
     $params = ['query' => OptionsResolver::resolve($options, ['dc', 'tag'])];
     return $this->client->get('/v1/catalog/service/' . $service, $params);
 }