go1com/util_url

There is no license information available for the latest version (dev-master) of this package.

Url generator for communication with microservices

dev-master 2018-06-15 08:16 UTC

This package is auto-updated.

Last update: 2024-04-12 19:32:42 UTC


README

Build Status

Provides a single source of truth on how to generate URLs that point to GO1 microservices

Usage

<?php

use go1\UtilUrl\ServiceUrlGenerator;

//Instance
$serviceUrlGenerator = new ServiceUrlGenerator();
$userServiceUrl = $serviceUrlGenerator->getInternalUrl('user');
$gatewayUrl = $serviceUrlGenerator->getPublicGatewayUrl();

//Static access
$servicesUrls = ServiceUrlGenerator::getInternalUrls(['user', 'lo', 'explore']);