keboola/service-client

Service Client 提供了一种方便的方式来获取 Keboola 服务 URL

1.1.1 2024-09-16 10:53 UTC

README

Service Client 提供了一种方便的方式来获取 Keboola 服务 URL。用法

use Keboola\ServiceClient\ServiceDnsType;
use Keboola\ServiceClient\ServiceClient;

// by default configured to return public URLs
$serviceClient = new ServiceClient('eu-central-1.keboola.com');
$serviceClient->getStorageApiUrl(); // https://connection.eu-central-1.keboola.com
$serviceClient->getEncryptionUrl(); // https://encryption.eu-central-1.keboola.com

// explicitly request internal URL
$serviceClient->getStorageApiUrl(ServiceDnsType::INTERNAL); // http://connection-api.connection.scv.cluster.local

// can be configured to return internal URLs by default
$serviceClient = new ServiceClient('eu-central-1.keboola.com', ServiceDnsType::INTERNAL);
$serviceClient->getStorageApiUrl(); // http://connection-api.connection.scv.cluster.local

许可证

MIT 许可,请参阅 LICENSE 文件。