Skip to content

Commit

Permalink
Release fix2 (#25)
Browse files Browse the repository at this point in the history
* 1. commit zookeeper connection

* Increase the processing of heartbeats

* 1. Send a request to subscribe

* 1. zookeeper watch event...

* 1. zookeeper watch event...

* 1. update zookeeper proto.

* 1. update zookeeper proto.

* update zookeeper proto.

* update zookeeper proto.

* Modify Chinese

* Modify Chinese

* Modify Chinese

* update sessionId lower.

* modify doc

* modify doc
  • Loading branch information
prFor authored Oct 29, 2022
1 parent fd9cf40 commit e4b205b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Apache ShenYu Nginx Module(Experimental)
Apache ShenYu Nginx Module
---

This module provided SDK to watch available ShenYu instance list as upstream nodes by Service Register Center for OpenResty.
Expand Down Expand Up @@ -140,7 +140,7 @@ Listen for changes to the node via the consul watch event. Here is an example of
init_worker_by_lua_block {
local register = require "shenyu.register.consul";
register.init({
uri = "http://192.168.152.128:8500",
uri = "http://127.0.0.1:8500",
path = "/v1/catalog/service/demo",
shenyu_storage = ngx.shared.shenyu_storage,
balancer_type = "chash",
Expand Down
1 change: 1 addition & 0 deletions RELEASE-NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@
* Support for listening to Apache ShenYu node changes using Zookeeper
* Support for listening to Apache ShenYu node changes using ETCD.
* Support for listening to Apache ShenYu node changes using Nacos
* Support for listening to Apache ShenYu node changes using Consul
* Add demo code to add the above.
* Add a description of the documentation for the above.
8 changes: 4 additions & 4 deletions example/eureka/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ lua_package_cpath "/usr/local/openresty/lualib/?.so;;";

lua_shared_dict upstream_list 10m;

# 第一次初始化
# Initialize for the first time
init_by_lua_block {
local eureka = require "eureka";
eureka.init({
Expand All @@ -31,21 +31,21 @@ init_by_lua_block {
});
}

# 定时拉取配置
# Periodic pull configuration
init_worker_by_lua_block {
local eureka = require "eureka";
local handle = nil;

handle = function ()
--TODO:控制每次只有一个worker执行
# Only one worker executes the control at a time
eureka.get_server_list();
ngx.timer.at(5, handle);
end
ngx.timer.at(5, handle);
}

upstream api_server {
server 0.0.0.1 down; #占位server
server 0.0.0.1 down; #Placeholder server

balancer_by_lua_block {
local balancer = require "ngx.balancer";
Expand Down

0 comments on commit e4b205b

Please sign in to comment.