定制 district5/service-dispatch-helper 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

district5/service-dispatch-helper

最新稳定版本:2.0.0

Composer 安装命令:

composer require district5/service-dispatch-helper

包简介

District5 Service Dispatcher Library

README 文档

README

About

This library is designed to facilitate a microservice architecture that is split using subdomains whilst keeping instance costs down during development / early stage. It allows you to split your application into microservices while running them within the same containerised images (or for example within the same GCP App Engine instance).

Installing

This library requires no other libraries.

  • Require in your composer
    • "district5/service-dispatch-helper": "*"

Usage

When calling the helper function, you should pass it the base domain name you are working on that all the subdomains hang from. For example, if our domains are api.district5.co.uk and www.district5.co.uk, we want api-service to map to the api microservice, and web-service to map to the main app. This could be achieved with the following:

$baseDomain = 'd5.gs';
$serviceMap = [
        'api' => 'api-service',
        'www' => 'web-service'
    ];

$selector = new \District5\ServiceDispatch\ServiceSelector($serviceMap);
$service = $selector->getServiceFromServerSubdomain('district5.co.uk');

统计信息

  • 总下载量: 99
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: mit
  • 更新时间: 2024-04-16