Class: Cyclid::API::Plugins::Transport
- Defined in:
- app/cyclid/plugins/transport.rb
Overview
Base class for Transport plugins
Class Method Summary collapse
-
.human_name ⇒ Object
Return the ‘human’ name for the plugin type.
Instance Method Summary collapse
-
#close ⇒ Object
Disconnect the transport.
-
#download(_io, _path) ⇒ Object
Copy a data from remote file to a local IO object.
-
#exec(_cmd, _path = nil) ⇒ Object
Run a command on the remote host.
-
#export_env(env = {}) ⇒ Object
If possible, export each of the variables in env as a shell environment variables.
-
#initialize(args = {}) ⇒ Transport
constructor
A new instance of Transport.
-
#upload(_io, _path) ⇒ Object
Copy data from a local IO object to a remote file.
Methods inherited from Base
config?, config_schema, default_config, get_config, register_plugin, set_config, update_config
Constructor Details
#initialize(args = {}) ⇒ Transport
Returns a new instance of Transport.
24 25 |
# File 'app/cyclid/plugins/transport.rb', line 24 def initialize(args = {}) end |
Class Method Details
.human_name ⇒ Object
Return the ‘human’ name for the plugin type
28 29 30 |
# File 'app/cyclid/plugins/transport.rb', line 28 def self.human_name 'transport' end |
Instance Method Details
#close ⇒ Object
Disconnect the transport
56 57 |
# File 'app/cyclid/plugins/transport.rb', line 56 def close end |
#download(_io, _path) ⇒ Object
Copy a data from remote file to a local IO object
51 52 53 |
# File 'app/cyclid/plugins/transport.rb', line 51 def download(_io, _path) false end |
#exec(_cmd, _path = nil) ⇒ Object
Run a command on the remote host.
41 42 43 |
# File 'app/cyclid/plugins/transport.rb', line 41 def exec(_cmd, _path = nil) false end |
#export_env(env = {}) ⇒ Object
If possible, export each of the variables in env as a shell environment variables. The default is simply to remember the environment variables, which will be exported each time when a command is run.
36 37 38 |
# File 'app/cyclid/plugins/transport.rb', line 36 def export_env(env = {}) @env = env end |
#upload(_io, _path) ⇒ Object
Copy data from a local IO object to a remote file.
46 47 48 |
# File 'app/cyclid/plugins/transport.rb', line 46 def upload(_io, _path) false end |