Overlord modules

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Finally, i was able to organize my patches into a branch that could be
reviewed and tested. Here it is:
http://github.com/kadamski/func/commits/overlord_modules/

What can we do with this? module_loader was unified, cmd_modules are now
loaded dynamically using it. Overlord modules architecture was added,
currently I've created one overlord module (called utils) with two
useful 
methods - list_minions() and async_poll(). call cmd_module was
converted 
to use this method instead of it's own and now func-transmit can also 
benefit from this API, here's example:

      [root@kinh ~]# cat /tmp/test2.yaml
      clients: "*"
      module: local
      method: utils.list_minions
      [root@kinh ~]# func-transmit --yaml < /tmp/test2.yaml
      ---
      - 'https://func:51234'
      - 'https://vps:51234'
       
      [root@kinh ~]# cat /tmp/test4.yaml
      clients: "*"
      async: True
      nforks: 1
      module: command
      method: run
      parameters: "/bin/echo Hello World"

      [root@kinh ~]# func-transmit --yaml < /tmp/test4.yaml
      --- '*-command-run-1218151318.6998739'
       
      [root@kinh ~]# cat /tmp/test5.yaml
      clients: "*"
      module: local
      method: utils.async_poll
      parameters: '*-command-run-1218151318.6998739'
       
      [root@kinh ~]# func-transmit --yaml < /tmp/test5.yaml
      ---
      func:
          - 0
          - |
              Hello World
          - ''
      vps:
          - 0
          - |
              Hello World
          - ''

"local" and "utils" can be renamed to whatever good names you will
find for it:) I would like to use this architecture when improving
copyfile support (so it's also available in func-transmit). Any
comments? 

_______________________________________________
Func-list mailing list
Func-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/func-list

[Index of Archives]     [Fedora Users]     [Linux Networking]     [Fedora Legacy List]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux