Remove a service from Consul

@param string $serviceID
@return \DCarbone\PHPConsulAPI\Error|null
337518
public function ServiceDeregister(string $serviceID) {
        $r = new Request('PUT', sprintf('v1/agent/service/deregister/%s', $serviceID), $this->config);

        return $this->requireOK($this->doRequest($r))[2];
    }
898006
public function deleteRole($projectId, $roleId)
    {
        return $this->apiClient->callEndpoint(
            sprintf('%s/%s/role/%s', self::ENDPOINT, $projectId, $roleId),
            array(),
            null,
            HttpMethod::REQUEST_DELETE
        );
    }
899677
public function deregister( $serviceName ) {
		unset( $this->registry[$serviceName] );
		unset( $this->singletons[$serviceName] );
		unset( $this->expectedReturnTypeByHandler[$serviceName] );

		foreach ( $this->aliases as $alias => $service ) {
			if ( $service === $serviceName ) {
				unset( $this->aliases[$alias] );
			}
		}
	}
941728
public function removeCredentialsByClientId($clientId)
    {
        return $this->createCommand()
            ->setRequest($this->client->delete(Url::factory('credentials')->setQuery(array('clientId' => $clientId))))
        ;
    }
277932
public function getClientBySpaceId(string $spaceId): ?Client
    {
        foreach ($this->clientsConfig as $clientConfig) {
            if ($clientConfig['space'] === $spaceId) {
                return $clientConfig['service'];
            }
        }

        return null;
    }
143465
public function destroy(Service $service, ServiceBooking $serviceBooking)
    {
        $service->bookings()->where($serviceBooking->getKeyName(), $serviceBooking->getKey())->first()->delete();

        return intend([
            'url' => route('adminarea.services.bookings.index'),
            'with' => [
                'warning' => trans('cortex/foundation::messages.resource_deleted', [
                    'resource' => trans('cortex/bookings::common.service_booking'),
                    'identifier' => $service->name.':'.$serviceBooking->id,
                ]),
            ],
        ]);

        return $serviceBooking->getKey();
    }
990032
public function removeById($connectionID)
    {
        if (isset($this->pool[$connectionID])) {
            unset(
                $this->pool[$connectionID],
                $this->slotsMap
            );

            return true;
        }

        return false;
    }
896021
private function load($serviceId, $serviceKey)
    {
        $service = $this->getConfig()->get($serviceId);
        if ($service === false) {
            $service = $this->tryAutowiring($serviceId, $serviceKey);
        }
        if (is_object($service) && ($service instanceof ServiceLocatorAwareInterface)) {
            $service->setServiceLocator($this);
        }
        return $service;
    }
1261446
public function removeRole($contentId, $roleId)
    {
        try {
            return $this->innerGateway->removeRole($contentId, $roleId);
        } catch (DBALException $e) {
            throw new RuntimeException('Database error', 0, $e);
        } catch (PDOException $e) {
            throw new RuntimeException('Database error', 0, $e);
        }
    }
93757
public function destroy($id)
    {
        $this->service->destroy($id);
        flash()->success('Se ha eliminado el artículo');
        return redirect()->to('backend/blog');
    }
947611
public function removeCoupon(string $subscriptionId)
    {
        // Log Debug
        $this->flow->getLogger()->debug("Removing Coupons from $subscriptionId");

        return $this->make(
            $this->flow->send(
                'post',
                $this->endpoint . '/deleteCoupon',
                ['subscriptionId' => $subscriptionId]
            )
        );
    }
247296
public function getClass(string $serviceId): string
    {
        if (!isset($this->registry[$serviceId])) {
            throw new \InvalidArgumentException(sprintf(
                'Could not find class for service with id "%s".',
                $serviceId
            ));
        }

        return $this->registry[$serviceId];
    }
141005
def delete_service(self, service_id):
		""""""
		content = self._fetch("/service/%s" % service_id, method="DELETE")
		return self._status(content)
44564
public function deleteFromId( $ContactNumberId){
        $rest = $this->getService( self::API_NUMBER . $ContactNumberId);
        $rest->DELETE();

        return $rest->getSuccess();
    }
128827
public function get_external_service_by_id($serviceid, $strictness=IGNORE_MISSING) {
        global $DB;
        $service = $DB->get_record('external_services',
                        array('id' => $serviceid), '*', $strictness);
        return $service;
    }
1056828
public function getProvider( $serviceId )
	{
		$item = $this->manager->getItem( $serviceId, $this->domains, true );
		return $this->manager->getProvider( $item, $item->getType() );
	}
1059974
public function admin_remove_service_confirmation($service) {
        global $CFG;
        $optionsyes = array('id' => $service->id, 'action' => 'delete',
            'confirm' => 1, 'sesskey' => sesskey());
        $optionsno = array('section' => 'externalservices');
        $formcontinue = new single_button(new moodle_url('service.php', $optionsyes),
                        get_string('delete'), 'post');
        $formcancel = new single_button(
                        new moodle_url($CFG->wwwroot . "/" . $CFG->admin . "/settings.php", $optionsno),
                        get_string('cancel'), 'get');
        return $this->output->confirm(get_string('deleteserviceconfirm', 'webservice', $service->name),
                $formcontinue, $formcancel);
    }