Skip to content

fucongcong/php-apollo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

php-apollo

环境依赖

  • php > 5.3
  • swoole

composer安装

composer require group-co/php-apollo

使用

<?php

use Group\ApolloConfig;

require 'vendor/autoload.php';

$config = new ApolloConfig("http://localhost:8080", "groupco");
//每2秒轮询一次
$config->poll(2);

swoole_timer_tick(1000, function () use ($config) {
    $val = $config->get("application", "environment1", "2");
    var_dump($val);
});

About

apollo基于swoole的php客户端

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages