Class: PlatformAPI::Formation

Inherits:
Object
  • Object
show all
Defined in:
lib/platform-api/client.rb

Overview

The formation of processes that should be maintained for an app. Update the formation to scale processes or change dyno sizes. Available process type names and commands are defined by the process_types attribute for the slug currently released on an app.

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ Formation

Returns a new instance of Formation.



1897
1898
1899
# File 'lib/platform-api/client.rb', line 1897

def initialize(client)
  @client = client
end

Instance Method Details

#batch_update(app_id_or_app_name, body = {}) ⇒ Object

Batch update process types

Parameters:

  • app_id_or_app_name:

    unique identifier of app or unique name of app

  • body:

    the object to pass as the request payload



1920
1921
1922
# File 'lib/platform-api/client.rb', line 1920

def batch_update(app_id_or_app_name, body = {})
  @client.formation.batch_update(app_id_or_app_name, body)
end

#info(app_id_or_app_name, formation_id_or_formation_type) ⇒ Object

Info for a process type

Parameters:

  • app_id_or_app_name:

    unique identifier of app or unique name of app

  • formation_id_or_formation_type:

    unique identifier of this process type or type of process to maintain



1905
1906
1907
# File 'lib/platform-api/client.rb', line 1905

def info(app_id_or_app_name, formation_id_or_formation_type)
  @client.formation.info(app_id_or_app_name, formation_id_or_formation_type)
end

#list(app_id_or_app_name) ⇒ Object

List process type formation

Parameters:

  • app_id_or_app_name:

    unique identifier of app or unique name of app



1912
1913
1914
# File 'lib/platform-api/client.rb', line 1912

def list(app_id_or_app_name)
  @client.formation.list(app_id_or_app_name)
end

#update(app_id_or_app_name, formation_id_or_formation_type, body = {}) ⇒ Object

Update process type

Parameters:

  • app_id_or_app_name:

    unique identifier of app or unique name of app

  • formation_id_or_formation_type:

    unique identifier of this process type or type of process to maintain

  • body:

    the object to pass as the request payload



1929
1930
1931
# File 'lib/platform-api/client.rb', line 1929

def update(app_id_or_app_name, formation_id_or_formation_type, body = {})
  @client.formation.update(app_id_or_app_name, formation_id_or_formation_type, body)
end