AIT-Core icon indicating copy to clipboard operation
AIT-Core copied to clipboard

List plugins and streams by their names in server config

Open aywaldron opened this issue 6 years ago • 1 comments

Currently, accessing a plugin's or stream's config from outside their creation requires iterating through the list of plugins/streams in order to find the one that matches what you're looking for, because their configs are in a yaml list where every element is generically named plugin or stream. It would allow for easier access if they were listed by their name.

For example, instead of

    server:
         plugins:
             - plugin:
                 name: ait.gui.AITGUIPlugin
                 inputs:
                     - telem_stream
                     - log_stream
                 outputs:
                     - command_stream

it would be

    server:
         plugins:
             - ait.gui.AITGUIPlugin:
                 inputs:
                     - telem_stream
                     - log_stream
                 outputs:
                     - command_stream

aywaldron avatar Jun 14 '19 22:06 aywaldron

Also, I believe we would need to change plugins to a dictionary to prevent the need to iterate through all of the plugins. So for example,

    server:
         plugins:
             ait.gui.AITGUIPlugin:
                 inputs:
                     - telem_stream
                     - log_stream
                 outputs:
                     - command_stream

seanlu99 avatar Jun 14 '19 22:06 seanlu99