YuanSheng Wang
53c3008f4f
change: reimplemented the feature heartbeat
with plugin way. ( #177 )
...
* change: reimplemented the feature `heartbeat` with plugin way.
2019-07-01 15:53:52 +08:00
WenMing
df7afe4f95
feature: added admin API to get plugins' list. ( #176 )
2019-07-01 13:29:21 +08:00
WenMing
92f019c7a1
feature: added admin API for plugins' schema. ( #174 )
2019-06-30 22:35:39 +08:00
希望之石
31671cc32c
move docs of plugins from /lua/apisix/plugins
to /doc
. #166 ( #167 )
2019-06-28 16:36:02 +08:00
Yuansheng
37cd80087d
change: modified the error message when failed to create etcd
...
instance.
2019-06-27 20:41:08 +08:00
WenMing
99895c53a0
style: fixed code style. ( #163 )
2019-06-27 17:57:50 +08:00
coolsoul
f365deb568
bugfix: fixed typo about consumer and add error handler when read config file. ( #162 )
2019-06-27 17:32:52 +08:00
Yuansheng
fc0b9705ec
change: wrote more information for debugging the response from etcd.
2019-06-26 21:28:32 +08:00
YuanSheng Wang
5e19e9e1cf
bugfix: etcd only kept less than 1000 modified history, it maybe fail if ( #160 )
...
* bugfix: etcd only kept less than 1000 modified history, it maybe fail if
we only use the `modifyIndex` of data, we should check the index value
in header too.
2019-06-26 19:35:05 +08:00
Yuansheng
2ae403fd46
bugfix: used long interval to fetch node status.
2019-06-26 17:44:22 +08:00
Yuansheng
9309abaed7
feature: support to fetch the ssl schema.
2019-06-24 18:49:30 -04:00
Yuansheng
1bb135af60
feature: supported for using wildcard to match the SNI of client https
...
request.
2019-06-24 18:49:30 -04:00
Yuansheng
7dbcea8571
feature: supported to manage ssl item by admin API and HTTPS client request.
2019-06-24 18:49:30 -04:00
YuanSheng Wang
72e0fe2393
feature: supported to collect nginx status and pushed it to etcd. ( #149 )
...
* feature: supported to collect nginx status and pushed it to etcd.
* the return value of the exported api is the same as the other methods in the plugin.
2019-06-22 08:24:02 +08:00
WenMing
c0c5c08644
feature: added admin API to get schema for FE. ( #148 )
...
* feature: added admin API to get schema for FE.
* added test cases.
* bugfix
2019-06-21 21:25:24 +08:00
WenMing
9961ae4e85
perf: removed useless split uri for admin APIs. ( #146 )
2019-06-21 16:11:04 +08:00
WenMing
13c4baa547
feature: added description of schema. ( #145 )
2019-06-21 15:16:05 +08:00
YuanSheng Wang
ca1f5e7b0d
feature: added remote_addr
attribute to route. ( #142 )
...
* feature: added `remote_addr` attribute to route.
2019-06-21 06:39:47 +08:00
Yuansheng
678e4228a0
feature: supported for using wildcard pattern to match host.
2019-06-20 10:00:07 -04:00
WenMing
9ee0d2c173
test: added test cases for limit req. ( #136 )
2019-06-19 23:52:59 +08:00
WenMing
6af8957f87
feature: added admin api for consumer. ( #135 )
2019-06-19 19:14:58 +08:00
YuanSheng Wang
36338bc95b
feature: merged the configuration between route and service. ( #133 )
...
* feature: merged the configuration between route and service.
2019-06-19 15:51:28 +08:00
WenMing
a76f690abb
test: added test cases for limit conn and limit count. ( #131 )
2019-06-19 13:06:03 +08:00
YuanSheng Wang
912e8b106d
feature: supported to match host of client request. ( #130 )
2019-06-19 12:41:38 +08:00
Yuansheng
c3f3ddb4d4
bugfix: checked if the service or upstream were referenced when user
...
submit a delete operation.
2019-06-18 17:06:49 +08:00
YuanSheng Wang
43cbd138e7
change: merged the similar code, and not allowed to specify id when use POST method. ( #128 )
...
* change: merged the similar code, and not allowed to specify id when use
POST method.
2019-06-18 16:15:55 +08:00
YuanSheng Wang
9460acd005
bugfix: avoid generating huge duplicate error logs when synchronizing data from etcd. ( #127 )
2019-06-18 15:41:32 +08:00
YuanSheng Wang
61f5f3af2a
bugfix: supported to LRU table to cache the JSON schema validator. ( #126 )
2019-06-18 11:23:18 +08:00
YuanSheng Wang
97a1c20420
doc(v0.5): set the configuration with admin API ( #125 )
...
* doc: set the configuration with admin API, except plugin `key-auth`.
Fix #124
2019-06-18 09:40:00 +08:00
YuanSheng Wang
c02d44f8e7
feature: added test cases about round-robin load balance algorithms. ( #123 )
...
* feature: added test cases about round-robin load balance algorithms.
* feature: added test cases about consistent hash algorithms.
2019-06-17 23:17:41 +08:00
YuanSheng Wang
371be03810
test: added test cases for prometheus plugin. ( #122 )
...
* test: added test cases for prometheus plugin.
2019-06-17 21:08:17 +08:00
WenMing
e1d0bb08ce
bugfix: got route id from url if not found in post body. ( #120 )
2019-06-17 18:00:56 +08:00
YuanSheng Wang
91b4d7675b
bug: not cache rapidjson schema doc object. ( #119 )
...
the `rapidjson` schema doc object can not be reused in different request, we have to generate a new doc for each request.
2019-06-17 17:48:32 +08:00
YuanSheng Wang
a4634da49e
feature: used json schema to check the configuration of limit-count
plugin. ( #116 )
...
* feature: used json schema to check the configuration of
`limit-count` plugin.
* travis: if there was any errors, exist directly.
2019-06-17 15:05:19 +08:00
YuanSheng Wang
3ca005eb7a
feature: checked the upstream id in route or service. ( #114 )
...
* feature: checked the upstream id in route or service.
2019-06-17 11:45:04 +08:00
Yuansheng
33e78fd43b
feature: used schema to check the upstream configuration.
...
Fix #102 .
2019-06-17 09:57:05 +08:00
Yuansheng
1921ea8ba5
feature: use schema check for service configuration.
...
Fix #111 .
2019-06-17 09:08:16 +08:00
Yuansheng
5a966152ba
test: missing no_shuffle()
in node/sanity.t
test case and added
...
more step information.
2019-06-16 12:33:13 +08:00
YuanSheng Wang
31cfc145bd
test: grep all of the error log and check it. ( #109 )
...
* travis: init the etcd server at first.
* test: grep all of the error log and check it.
2019-06-16 09:36:22 +08:00
YuanSheng Wang
fee7ec58ef
optmize: reused a Lua table of plugins. feature: supported to check the Lua source by command make check
. ( #108 )
...
* optmize: reused a Lua table of plugins.
* feature: supported to check the Lua source by command `make check`.
* bug: reinitialize the prometheus variable each time.
2019-06-16 07:32:25 +08:00
YuanSheng Wang
dae069d51a
bugfix: returned 404 response if the service is not existing. ( #107 )
...
* bugfix: returned 404 response if the service is not existing.
2019-06-15 22:34:26 +08:00
YuanSheng Wang
16f5f27c90
feature: used schema to check the upstream configuration in etcd. ( #105 )
...
* feature: used schema to check the upstream configuration in etcd.
* change: used Lua table to avoid concat JSON string by manual for schema.
* optimize: changed a smaller wait time, faster way to know if there has new data coming.
2019-06-15 11:49:58 +08:00
YuanSheng Wang
32110aeba0
feature: returned 502 if there is no any valid upstream. ( #100 )
...
* feature: returned 502 if there is no any valid upstream.
2019-06-15 08:32:51 +08:00
Yuansheng
180cca723b
feature: the minimum is 1 if the route id is integer.
2019-06-15 08:32:28 +08:00
Yuansheng
7a60149b6d
feature: checked the id of route.
2019-06-15 07:17:34 +08:00
Yuansheng
a07894e7ac
bugfix: checked the service id if it is valid.
2019-06-14 22:55:57 +08:00
Yuansheng
5db79419db
test: added more test cases about the schema of route.
2019-06-14 22:05:53 +08:00
Yuansheng
09cd32eb62
bugfix: return directly if failed to fetch service attribute by
...
service id.
2019-06-14 17:56:13 +08:00
YuanSheng Wang
f560316803
test: check the service config with json schema
after fetched it form etcd. ( #96 )
...
* test: check the service config with `json schema` after fetched it form etcd.
* test: sleep one more seconds waiting for the etcd sync.
2019-06-14 17:08:44 +08:00
WenMing
ba576985b1
bugfix: added the plugin load. ( #95 )
...
* bugfix: added the plugin load.
* test: added test cases for limit count.
* test: added Lua sleep at the end of init_worker.
left enough time for read data from etcd, otherwise worker maybe deal with request before get data from etcd.
* test: added no_shuffle();
2019-06-14 16:11:14 +08:00
YuanSheng Wang
f270c6ff63
feature: used schema to check the etcd data if it is valid. ( #91 )
...
* feature: used schema to check the etcd data if it is valid.
2019-06-14 10:46:42 +08:00
WenMing
1602268833
bugfix: only accept client IP as key now. ( #85 )
2019-06-13 19:11:15 +08:00
WenMing
c6e69cbcc9
feature: changed plugin_config to plugins. ( #84 )
2019-06-13 17:25:39 +08:00
WenMing
fd8618e731
feature: added schema check for plugins.
2019-06-13 14:39:35 +08:00
YuanSheng Wang
8cfd7d4180
feature: implemented routes API for admin user, allowed user to manage route. ( #79 )
...
* feature: supported to generate admin API basic configurations when the admin API is enabled.
* feature: supported to manage route API for admin user, it contains: PUT, GET, DELETE and POST.
* feature: used json schema to check if the request configuration is valid.
2019-06-13 12:01:36 +08:00
YuanSheng Wang
17fecb3e53
feature: supported to cache non-table Lua object by lrucache
library. ( #80 )
...
* feature: supported to cache non-table Lua object by `lrucache` library.
* bug: used a table to avoid one bug of `rapidjson`, fix it later.
2019-06-12 10:34:45 +08:00
Yuansheng
48e9312d7b
change: updated the internal version to v0.5-beta.
2019-06-12 06:18:42 +08:00
Yuansheng
c86e778925
test: checked the error log if it contains error
level log.
2019-06-12 06:13:39 +08:00
YuanSheng Wang
463e5601b3
optimize: used lru
way to cache the validator object for schema. ( #77 )
...
* optimize: used `lru` way to cache the validator object for schema.
Fix #76 .
2019-06-11 23:47:00 +08:00
YuanSheng Wang
0bac20f4d4
feature: implemented plugin limit-conn
. ( #75 )
...
* feature: implemented plugin `limit-conn`.
* luarocks: updated the library `lua-resty-ngxvar` version to 0.3.
2019-06-11 17:31:40 +08:00
YuanSheng Wang
45e28199a9
feature: supported consistent hash for dynamic load balancing. ( #69 )
...
* feature: supported consistent hash for dynamic load balancing.
2019-06-11 12:20:57 +08:00
Yuansheng
a66c393536
bugfix: supported for the json library encoding cdata
type.
2019-06-11 11:16:03 +08:00
Yuansheng
6fbb06eb33
optimize: reduced the similar code.
2019-06-11 10:20:13 +08:00
WenMing
9b901727af
CI: added luacheck in CI. ( #68 )
2019-06-11 09:38:00 +08:00
WenMing
1737fb702e
feature: added rapidjson for schema validation. ( #67 )
2019-06-10 23:41:43 +08:00
YuanSheng Wang
10e63c637e
optimize: returns a fetch function when creating a new lrucache
object, which can be used directly to get cached data. ( #66 )
...
* optimize: returns a fetch function when creating a new `lrucache`
object, which can be used directly to get cached data.
* test: added test case for `core.lrucache` library.
2019-06-10 20:40:39 +08:00
Yuansheng
0ab3e53cb9
test: added test case about core.id
and core.utils
library.
2019-06-10 17:25:49 +08:00
Yuansheng
a41d54a653
change: added a global swith to control if enable the feature heartbeat.
...
optimize: used a shorter `user-agent` name.
2019-06-10 17:25:49 +08:00
Yuansheng
d5fa0598fa
feature: generated an uuid for each apisix instance, and this uuid will
...
be reported to heartbeat service center.
2019-06-10 17:25:49 +08:00
Yuansheng
2e318e53c2
change: used GET
method to report information.
2019-06-10 17:25:49 +08:00
Yuansheng
884120f180
test: added test case for core/timer
library.
2019-06-10 17:25:49 +08:00
Yuansheng
c9d0879194
test: checked the error log.
...
plugin prometheus: renamed the share dict name to `prometheus-metrics`.
2019-06-10 17:25:49 +08:00
Yuansheng
ea5353a3e3
test: added tests for core/json
library.
2019-06-10 17:25:49 +08:00
Yuansheng
931c6e9875
optimize: implemented delay_encode
for json
component, encoding is
...
only done when string output is really needed.
2019-06-10 17:25:49 +08:00
Yuansheng
6336f4b9ef
feature: implemented heartbeat mechanism.
2019-06-10 17:25:49 +08:00
WenMing
3ddb972d37
bugfix: add err handle for obj cache. ( #56 )
2019-06-10 11:42:14 +08:00
Yuansheng
a6d69a2453
doc key-auth: style.
2019-06-06 16:27:09 +08:00
Yuansheng Wang
abbf95d78a
feature: implemented consumer
and key-auth
plugin.
2019-06-06 16:06:28 +08:00
WenMing
e822ac0f4c
doc: add doc for limit count. ( #52 )
2019-06-06 10:57:40 +08:00
Yuansheng Wang
fe22428ab5
optimize: merged phase rewrite
and access
, make it faster.
2019-06-06 10:49:29 +08:00
Yuansheng Wang
c43cbb249a
doc: used Chinese link name for CN document.
2019-06-05 17:36:58 +08:00
Yuansheng Wang
c08a66bfe4
doc: fixed the wrong link.
2019-06-05 05:29:45 -04:00
Yuansheng Wang
56130f6e24
doc: added more section for plugin prometheus.
2019-06-05 17:23:46 +08:00
Yuansheng Wang
8b558944f0
doc: added document of plugin prometheus.
2019-06-05 17:23:46 +08:00
Yuansheng Wang
656b87017e
optimize: avoided to generate temporary Lua table.
2019-06-05 15:21:35 +08:00
Yuansheng Wang
8cea2c66d7
bugfix: used a single option as the apisix configuration prefix name.
2019-06-05 14:21:25 +08:00
Yuansheng Wang
80dc33e86e
plugin key-auth
: added notice context.
2019-06-05 01:25:48 -04:00
Yuansheng Wang
9290af2c47
doc: added how to use service
.
2019-06-05 01:25:48 -04:00
Yuansheng Wang
c78f6a207d
bugfix: updated the version of the configuration data if there are any changes.
2019-06-04 09:20:32 +08:00
Yuansheng Wang
ed0fa62a82
change: printed fewer logs when a duplicate error log is generated.
2019-06-03 16:17:30 +08:00
Yuansheng Wang
c5395ce6d7
bugfix: disabled some feature under MAC OS X.
2019-06-03 14:16:27 +08:00
Yuansheng Wang
67e0b333ad
bugfix: the routes maybe empty.
2019-05-31 15:50:53 +08:00
Yuansheng Wang
368f98b57f
plugin prometheus
: printed error log if failed to fetch the Nginx status.
2019-05-31 15:22:55 +08:00
Yuansheng Wang
47c9c3dd5e
change: renamed the config version name to conf_version
.
2019-05-31 11:27:52 +08:00
Yuansheng Wang
c3fbfc884c
plugin prometheus
: collected the etcd server status.
2019-05-31 11:26:42 +08:00
Yuansheng Wang
aab9c87547
plugin prometheus: collected the bandwidth data.
2019-05-30 18:16:40 +08:00
Yuansheng Wang
2749c4fce7
plugin prometheus: added more union about connections.
2019-05-30 17:51:21 +08:00
Yuansheng Wang
fe0205629b
optimize: used table to store all of the small string parts.
2019-05-30 11:38:04 +08:00
Yuansheng Wang
8349925d03
optimize: used lrucache
only for string objects.
2019-05-30 11:17:27 +08:00
Yuansheng Wang
a6425f3a8f
change: updated the calling way of ngxvar
module which is faster.
2019-05-30 11:14:58 +08:00
Yuansheng Wang
0a94996d05
optmize prometheus
: reduced to create temporary string object.
2019-05-29 16:21:39 +08:00
Yuansheng Wang
0da8c5d9b0
optimize: merged the api router and user router to one instance.
2019-05-29 16:20:02 +08:00
Yuansheng Wang
46a5e7ac19
optimize: reused temporary Lua table by tablepool
.
2019-05-29 10:29:40 +08:00
Yuansheng Wang
9c5bb8759a
optimize: found by flame graph.
2019-05-29 09:33:04 +08:00
Yuansheng Wang
68963748a1
bugfix: if there is no valid node under the observed 'key', sleep an extra second, avoided the dead loop.
2019-05-28 21:03:10 +08:00
Yuansheng Wang
e408b5a449
limit-req
bugfix: used return value to set the response code.
2019-05-28 16:48:54 +08:00
Yuansheng Wang
33d79947b5
change: all of the config were put under /apisix/
.
...
Fix #33 .
2019-05-28 16:40:33 +08:00
WenMing
6f2bd1f38e
Doc update ( #34 )
...
* doc: added doc.
* update
* added more examples
2019-05-28 16:26:30 +08:00
Yuansheng Wang
1e3f15b159
doc: added some basic concept definitions.
2019-05-28 15:35:49 +08:00
Yuansheng Wang
3c65b6ee29
change: code style by lj-releng.
2019-05-28 11:27:34 +08:00
Yuansheng Wang
ac67fb6dc1
change: typo.
2019-05-28 11:11:41 +08:00
Yuansheng Wang
849df38ace
optimize: used lua table to cache the ngx variable.
2019-05-28 10:49:53 +08:00
Yuansheng Wang
2c0cf0594a
feature: support service model.
2019-05-28 09:51:38 +08:00
Yuansheng Wang
cf05aef2d6
optimize: reused the temporary Lua table.
2019-05-27 10:22:30 +08:00
Yuansheng Wang
4b899530c2
optimize prometheus plugin: used lrucache way to cache the encoded label value.
2019-05-25 00:39:40 +08:00
Yuansheng Wang
c40dbf4b8d
bugfix: cleared the table cache when reload local plugins.
2019-05-24 23:20:21 +08:00
Yuansheng Wang
7aa5b22505
optimize: used lrucache
to store the api router.
2019-05-24 23:20:21 +08:00
Yuansheng Wang
122777cffa
feature: implemented plugin prometheus
.
2019-05-24 23:20:21 +08:00
Yuansheng Wang
a03e076e4b
feature: allowed custom plugin lrucache parameters.
2019-05-24 13:37:51 +08:00
Yuansheng Wang
1b154f27a9
change: used different parameter for plugin balancer
.
2019-05-24 11:50:10 +08:00
Yuansheng Wang
c3c046f0fc
optimize: removed the version
in lrucache key
.
2019-05-24 09:22:06 +08:00
Yuansheng Wang
c3f61fa080
optmize: used common lrucache to store and fetch the server_piker
.
2019-05-23 22:38:08 +08:00
Yuansheng Wang
3cf18bb4eb
bugfix: maybe missing body when calling response.exit
.
2019-05-23 21:57:51 +08:00
Yuansheng Wang
6ab1dcde81
change: saved the consumer id to ctx.
2019-05-23 21:29:56 +08:00
Yuansheng Wang
743be5eaa0
doc: added doc for plugin key-auth
.
2019-05-23 09:27:15 -04:00
Yuansheng Wang
f454328605
feature: get the consumer id by auth plugin like key-auth
.
2019-05-23 09:27:15 -04:00
Yuansheng Wang
162c2e0dc7
feature: added core.request
module.
2019-05-23 15:19:07 +08:00
Yuansheng Wang
0d64f7d1c3
change: used response
which is a fully name.
2019-05-23 14:42:42 +08:00
Yuansheng Wang
ebd046dbdf
change: fetched all of the config from apisix.core.config
.
2019-05-22 09:19:25 +08:00
Yuansheng Wang
2a3b1c87e9
change: renamed plugin file, made it simple.
2019-05-21 23:24:19 +08:00
Yuansheng Wang
d1e283d9d9
doc: added doc of limit count
.
2019-05-21 23:08:30 +08:00
Yuansheng Wang
f447835f2c
optmize: used lrucache
+ config_etcd
to cache all of the routes from etcd, deleted the duplicated code.
2019-05-21 22:53:28 +08:00
Yuansheng Wang
4f71bc97e8
change: added todo comments.
2019-05-21 11:53:04 +08:00
Yuansheng Wang
b947dab39c
feature: implemented set_header
in response module.
2019-05-21 11:51:46 +08:00
Yuansheng Wang
1f1696c0e9
feature: implemented plugin limit-count
.
2019-05-21 11:17:46 +08:00
Yuansheng Wang
31fac0c739
optmize: supported to use stale
object for lrucache case.
2019-05-21 11:04:05 +08:00
Yuansheng Wang
242da97d4f
change: code style.
2019-05-21 10:42:26 +08:00
Yuansheng Wang
4570ba59c0
feature: supported to use lrucache for plugin developer.
2019-05-21 10:02:06 +08:00
Yuansheng Wang
20e240bb96
feature: implemented new feature limit-req
.
2019-05-21 10:02:06 +08:00
Yuansheng Wang
ee1d508e04
change: code style.
2019-05-20 12:06:34 +08:00
YuanSheng Wang
4fc74ea6e7
feature: the upstream data can be stored under /user_upstream
and indexed by id. ( #18 )
...
* change: code style, used `apisix.core` if possible.
2019-05-20 10:36:23 +08:00
Yuansheng Wang
097ef81d69
feature: supported for automatically getting the latest etcd
data.
2019-05-17 17:47:58 +08:00
Yuansheng Wang
c7f7bceda5
optimize: cached the version of config to api_ctx
, make it more easy to use.
2019-05-17 16:23:51 +08:00
YuanSheng Wang
95712403c0
feature: supported balancer
phase. ( #16 )
2019-05-17 15:58:15 +08:00
Yuansheng Wang
d605a01b2a
change: rename the project to apisix
.
...
Fixed #14 .
2019-05-13 14:31:26 +08:00
YuanSheng Wang
e7aeab2e9f
feature: fetched the routes from etcd and update the routes automatic. ( #11 )
2019-05-11 10:14:46 +08:00
Yuansheng Wang
5f76d73a9c
change: make apimeta
as a global variable and it include most libraries.
2019-05-08 11:30:16 +08:00
YuanSheng Wang
2927a60c89
feature: supported to load the plugin and passed a simple example. ( #7 )
2019-05-08 10:38:45 +08:00
Yuansheng Wang
618201c7ce
change: renamed the plugin's base file to base_plugin
.
2019-05-07 16:06:01 +08:00
Yuansheng Wang
0b302a2d47
change: used '###-##-###' as the name style of plugin.
2019-05-07 15:58:44 +08:00