Class: PlatformAPI::Dyno
- Inherits:
-
Object
- Object
- PlatformAPI::Dyno
- Defined in:
- lib/platform-api/client.rb
Overview
Dynos encapsulate running processes of an app on Heroku. Detailed information about dyno sizes can be found at: https://devcenter.heroku.com/articles/dyno-types.
Instance Method Summary collapse
-
#create(app_id_or_app_name, body = {}) ⇒ Object
Create a new dyno.
-
#info(app_id_or_app_name, dyno_id_or_dyno_name) ⇒ Object
Info for existing dyno.
-
#initialize(client) ⇒ Dyno
constructor
A new instance of Dyno.
-
#list(app_id_or_app_name) ⇒ Object
List existing dynos.
-
#restart(app_id_or_app_name, dyno_id_or_dyno_name) ⇒ Object
Restart dyno.
-
#restart_all(app_id_or_app_name) ⇒ Object
Restart all dynos.
-
#stop(app_id_or_app_name, dyno_id_or_dyno_name) ⇒ Object
Stop dyno.
Constructor Details
#initialize(client) ⇒ Dyno
Returns a new instance of Dyno.
1752 1753 1754 |
# File 'lib/platform-api/client.rb', line 1752 def initialize(client) @client = client end |
Instance Method Details
#create(app_id_or_app_name, body = {}) ⇒ Object
Create a new dyno.
1760 1761 1762 |
# File 'lib/platform-api/client.rb', line 1760 def create(app_id_or_app_name, body = {}) @client.dyno.create(app_id_or_app_name, body) end |
#info(app_id_or_app_name, dyno_id_or_dyno_name) ⇒ Object
Info for existing dyno.
1791 1792 1793 |
# File 'lib/platform-api/client.rb', line 1791 def info(app_id_or_app_name, dyno_id_or_dyno_name) @client.dyno.info(app_id_or_app_name, dyno_id_or_dyno_name) end |
#list(app_id_or_app_name) ⇒ Object
List existing dynos.
1798 1799 1800 |
# File 'lib/platform-api/client.rb', line 1798 def list(app_id_or_app_name) @client.dyno.list(app_id_or_app_name) end |
#restart(app_id_or_app_name, dyno_id_or_dyno_name) ⇒ Object
Restart dyno.
1768 1769 1770 |
# File 'lib/platform-api/client.rb', line 1768 def restart(app_id_or_app_name, dyno_id_or_dyno_name) @client.dyno.restart(app_id_or_app_name, dyno_id_or_dyno_name) end |
#restart_all(app_id_or_app_name) ⇒ Object
Restart all dynos.
1775 1776 1777 |
# File 'lib/platform-api/client.rb', line 1775 def restart_all(app_id_or_app_name) @client.dyno.restart_all(app_id_or_app_name) end |
#stop(app_id_or_app_name, dyno_id_or_dyno_name) ⇒ Object
Stop dyno.
1783 1784 1785 |
# File 'lib/platform-api/client.rb', line 1783 def stop(app_id_or_app_name, dyno_id_or_dyno_name) @client.dyno.stop(app_id_or_app_name, dyno_id_or_dyno_name) end |