edeliver_fork v1.4.6 Edeliver.Relup.InsertInstruction
Provides functions to insert relup instructions at a given position
  which can be used in Edeliver.Relup.Instruction behaviour implementations
  in the relup file.
Link to this section Summary
Functions
Appends instruction(s) to the list of other instructions
Appends instruction(s) to the instruction after the “point of no return” but before any instruction
Inserts instruction(s) after the given instruction
Inserts instruction(s) right after the last load_object_code instruction
Inserts instruction(s) right after the point of no return
Inserts instruction(s) before the given instruction
Inserts instruction(s) before the point of no return
Returns true if the given instruction is an instruction which modifies an application
Returns true if the given instruction is an instruction which modifies code
Returns true if the given instruction is an instruction which modifies any process
Link to this section Functions
append( Edeliver.Relup.Instructions.t() | Edeliver.Relup.Instructions.instructions(), new_instructions :: Edeliver.Relup.Instructions.instruction() | Edeliver.Relup.Instructions.instructions() ) :: updated_instructions :: Edeliver.Relup.Instructions.t() | Edeliver.Relup.Instructions.instructions()
Appends instruction(s) to the list of other instructions.
append_after_point_of_no_return( Edeliver.Relup.Instructions.t() | Edeliver.Relup.Instructions.instructions(), new_instructions :: Edeliver.Relup.Instructions.instruction() | Edeliver.Relup.Instructions.instructions() ) :: updated_instructions :: Edeliver.Relup.Instructions.t() | Edeliver.Relup.Instructions.instructions()
Appends instruction(s) to the instruction after the “point of no return” but before any instruction
which:
- loads or unloads new code, which means before any
  
load_module,load,add_module,delete_module,remove,purgeinstruction and - before any instruction which updates, starts or stops
any running processes, which means before any
  
code_change,update,start,stopinstruction and before any instruction which (re-)starts or stops any application or the emulator, which means before any
add_application,remove_application,restart_application,restart_emulatorandrestart_new_emulatorinstruction.It does not consider load-instructions for
Edeliver.Relup.RunnableInstructions as code loading instructions for the release. They are inserted by theRunnableInstructionitself to ensure that the code of the runnable instruction is loaded before the instruction is executed. SeeEdeliver.Relup.ShiftInstruction.ensure_module_loaded_before_instruction/3.
insert_after_instruction( Edeliver.Relup.Instructions.t() | Edeliver.Relup.Instructions.instructions(), new_instructions :: Edeliver.Relup.Instructions.instruction() | Edeliver.Relup.Instructions.instructions(), after_instruction :: Edeliver.Relup.Instructions.instruction() ) :: updated_instructions :: Edeliver.Relup.Instructions.t() | Edeliver.Relup.Instructions.instructions()
Inserts instruction(s) after the given instruction.
insert_after_load_object_code( Edeliver.Relup.Instructions.t() | Edeliver.Relup.Instructions.instructions(), new_instructions :: Edeliver.Relup.Instructions.instruction() | Edeliver.Relup.Instructions.instructions() ) :: updated_instructions :: Edeliver.Relup.Instructions.t() | Edeliver.Relup.Instructions.instructions()
  Inserts instruction(s) right after the last load_object_code instruction
which is usually before the “point of no return” and one of the first instructions. This means that it is the first custom instruction which is executed. It is executed twice, once when checking whether the upgrade can be installed and once when the upgrade is installed.
insert_after_point_of_no_return( Edeliver.Relup.Instructions.t() | Edeliver.Relup.Instructions.instructions(), new_instructions :: Edeliver.Relup.Instructions.instruction() | Edeliver.Relup.Instructions.instructions() ) :: updated_instructions :: Edeliver.Relup.Instructions.t() | Edeliver.Relup.Instructions.instructions()
Inserts instruction(s) right after the point of no return.
This means that it is the first instruction which should not fail, because the release handler will restart the release if any instruction fails after the point of no return.
insert_before_instruction( Edeliver.Relup.Instructions.t() | Edeliver.Relup.Instructions.instructions(), new_instructions :: Edeliver.Relup.Instructions.instruction() | Edeliver.Relup.Instructions.instructions(), before_instruction :: Edeliver.Relup.Instructions.instruction() ) :: updated_instructions :: Edeliver.Relup.Instructions.t() | Edeliver.Relup.Instructions.instructions()
Inserts instruction(s) before the given instruction.
insert_before_point_of_no_return( Edeliver.Relup.Instructions.t() | Edeliver.Relup.Instructions.instructions(), new_instructions :: Edeliver.Relup.Instructions.instruction() | Edeliver.Relup.Instructions.instructions() ) :: updated_instructions :: Edeliver.Relup.Instructions.t() | Edeliver.Relup.Instructions.instructions()
Inserts instruction(s) before the point of no return.
All instructions running before that point of no return which fail will cause the upgrade to fail, while failing instructions running after that point will cause the node to restart the release.
modifies_applications?(Edeliver.Relup.Instructions.instruction()) :: boolean()
Returns true if the given instruction is an instruction which modifies an application
  by either (re-)starting or stopping it or by restarting the emulator. It returns
  true for the add_application, remove_application, restart_new_emulator
  and the restart_emulator, relup instructions.
modifies_code?(Edeliver.Relup.Instructions.instruction()) :: boolean()
Returns true if the given instruction is an instruction which modifies code
  by loading, unloading or purging it. It returns true for the load_module, add_module
  delete_module, load, remove and purge relup instructions.
modifies_processes?(Edeliver.Relup.Instructions.instruction()) :: boolean()
Returns true if the given instruction is an instruction which modifies any process
  by either by sending the  code_change sys event or by starting or stopping any
  process. It returns true for the code_change, start, stop and update
  relup instructions.