summaryrefslogtreecommitdiffstats
path: root/conf.d
diff options
context:
space:
mode:
Diffstat (limited to 'conf.d')
-rw-r--r--conf.d/project/json.d/README.md2
-rw-r--r--conf.d/project/lua.d/onload-daemon-01-init.lua10
-rw-r--r--conf.d/project/lua.d/onload-daemon-03-controls.lua2
-rw-r--r--conf.d/project/lua.d/onload-daemon-10-event.lua4
4 files changed, 9 insertions, 9 deletions
diff --git a/conf.d/project/json.d/README.md b/conf.d/project/json.d/README.md
index 153990c..9bd15bf 100644
--- a/conf.d/project/json.d/README.md
+++ b/conf.d/project/json.d/README.md
@@ -8,7 +8,7 @@ By default controller searches for a config filename with the same 'middlename'
You may overload config search path with environement variables
* AFB_BINDER_NAME: change patern config search path. 'export AFB_BINDER_NAME=sample' will make controller to search for a configfile name 'onload-sample-xxx.json'.
- * CONTROL_CONFIG_PATH: change default reserch path for configuration. You may provide multiple directories separated by ':'.
+ * CONTROL_CONFIG_PATH: change default reserch path for configuration. You may provide multiple directories separated by ':'.
* CONTROL_LUA_PATH: same as CONTROL_CONFIG_PATH but for Lua script files.
Example to load a config name 'onload-myconfig-test.json' do
diff --git a/conf.d/project/lua.d/onload-daemon-01-init.lua b/conf.d/project/lua.d/onload-daemon-01-init.lua
index ebdc678..26ff08a 100644
--- a/conf.d/project/lua.d/onload-daemon-01-init.lua
+++ b/conf.d/project/lua.d/onload-daemon-01-init.lua
@@ -21,7 +21,7 @@ _Global_Context={}
--[[
This function is call during controller init phase as describe in onload-daemon-sample.json
It receives two argument 1st one is the source (here on load) second one is the arguments
- as expose in config file.
+ as expose in config file.
In this sample we create an event that take the name of args["zzzz"], the resulting handle
is save into _Global_Context for further use.
@@ -32,17 +32,17 @@ _Global_Context={}
function _Sample_Controller_Init(source, control)
printf ("[-- Sample_Controller_Init --] source=%d control=%s", source, Dump_Table(control))
-
+
-- if no argument return now
- if (control==nil or control["zzzz"]==nil) then
+ if (control==nil or control["zzzz"]==nil) then
printf ("[-- Sample_Controller_Init --] no event name given")
return
end
-- set a count to make more visible each call
_Global_Context["counter"]=0
-
+
-- just for fun create an event
_Global_Context["event"]=AFB:evtmake(control["zzzz"])
-end
+end
diff --git a/conf.d/project/lua.d/onload-daemon-03-controls.lua b/conf.d/project/lua.d/onload-daemon-03-controls.lua
index f65c019..e9c8b51 100644
--- a/conf.d/project/lua.d/onload-daemon-03-controls.lua
+++ b/conf.d/project/lua.d/onload-daemon-03-controls.lua
@@ -15,7 +15,7 @@
limitations under the License.
Following function are called when a client activate a control with
- controller api -> APi=control VERB=dispatch
+ controller api -> APi=control VERB=dispatch
arguments are
- source (0) when requesting the control (-1) when releasing
- control comme from config given with 'args' in onload-middlename-xxxxx.json
diff --git a/conf.d/project/lua.d/onload-daemon-10-event.lua b/conf.d/project/lua.d/onload-daemon-10-event.lua
index c0b21f9..474ebe0 100644
--- a/conf.d/project/lua.d/onload-daemon-10-event.lua
+++ b/conf.d/project/lua.d/onload-daemon-10-event.lua
@@ -45,7 +45,7 @@ function _Simple_Timer_Test (request, client)
-- if event does not exit create it now.
if (_MyContext["event"] == nil) then
_MyContext["event"]= AFB:evtmake(client["label"])
- end
+ end
-- if delay not defined default is 5s
if (client["delay"]==nil) then client["delay"]=5000 end
@@ -67,7 +67,7 @@ function _Simple_Timer_Test (request, client)
-- settimer take a table with delay+count as input (count==0 means infinite)
AFB:timerset (myTimer, "_Timer_Test_CB", context)
- -- nothing special to return send back
+ -- nothing special to return send back
AFB:success (request, myTimer)
return 0