cvedia::rt::iface::SolutionUpdater¶
#include <solutionupdater.h>
Public Functions¶
| Name | |
|---|---|
| SolutionUpdater() =default | |
| virtual | ~SolutionUpdater() =default |
| SolutionUpdater(const SolutionUpdater & ) =delete | |
| SolutionUpdater & | operator=(const SolutionUpdater & ) =delete |
| SolutionUpdater(SolutionUpdater && ) =delete | |
| SolutionUpdater & | operator=(SolutionUpdater && ) =delete |
| virtual std::string | getId() =0 Retrieves ID of updater implementation. |
| virtual expected< SolutionUpdateInfos > | initialize(const SolutionUpdateDescriptors & solutionsToCheck ={}, const std::string & solutionsDir ="") =0 Used to initialize the solution updater before the update. |
| virtual expected< SolutionUpdateInfo > | prepareUpdate(const SolutionUpdateInfo & solutionUpdateInfo, const std::string & solutionsDir ="") =0 Used to prepare for update and perform necessary pre-update operations. |
| virtual expected< SolutionUpdateInfo > | performUpdate(const SolutionUpdateInfo & solutionUpdateInfo, const std::string & solutionsDir ="") =0 Used to perform the actual update operation. |
| virtual expected< SolutionUpdateInfo > | finishUpdate(const SolutionUpdateInfo & solutionUpdateInfo, const std::string & solutionsDir ="") =0 Used to finish the update or perform additional operations. |
| virtual expected< SolutionUpdateInfo > | cancelUpdate(const SolutionUpdateInfo & solutionUpdateInfo, const std::string & solutionsDir ="") =0 Used to cancel and rollback the update. |
| virtual expected< void > | shutdown() =0 Used to shut down and clean after the updater. |
Detailed Description¶
class cvedia::rt::iface::SolutionUpdater;
Generic solution updater interface, used as a base class for all functionality related to solution updating
Public Functions Documentation¶
function SolutionUpdater¶
SolutionUpdater() =default
function ~SolutionUpdater¶
virtual ~SolutionUpdater() =default
function SolutionUpdater¶
SolutionUpdater(
const SolutionUpdater &
) =delete
function operator=¶
SolutionUpdater & operator=(
const SolutionUpdater &
) =delete
function SolutionUpdater¶
SolutionUpdater(
SolutionUpdater &&
) =delete
function operator=¶
SolutionUpdater & operator=(
SolutionUpdater &&
) =delete
function getId¶
virtual std::string getId() =0
Retrieves ID of updater implementation.
Return: Updater implementation ID
Can be used to point updater API to correct implementation to use
function initialize¶
virtual expected< SolutionUpdateInfos > initialize(
const SolutionUpdateDescriptors & solutionsToCheck ={},
const std::string & solutionsDir =""
) =0
Used to initialize the solution updater before the update.
Parameters:
- solutionsToCheck optional parameter containing a vector of solution name/uri pairs. If provided, only solutions from this vector will be checked to verify they're available for update. By default you can leave this empty and initialize() will automatically retrieve this info from rtconfig.json
- solutionsDir optional path to directory to search for solutions, by default this is retrieved automatically from RTCORE solutions API
Return: Output data as a vector of solution update info structures or an error if it occurs.
This can be used to prepare the updater for the update phase, e.g. by providing necessary input data (list of solutions that will be updated), or by performing some required initialization steps.
function prepareUpdate¶
virtual expected< SolutionUpdateInfo > prepareUpdate(
const SolutionUpdateInfo & solutionUpdateInfo,
const std::string & solutionsDir =""
) =0
Used to prepare for update and perform necessary pre-update operations.
Parameters:
- solutionUpdateInfo a structure specifying a single solution to update. Usually this is one of the structures returned by initialize()
- solutionsDir optional path to directory to search for solutions, by default this is retrieved automatically from RTCORE solutions API
Return: Output data as a single solution update info structure or an error if it occurs.
This can be used to perform necessary operations before the actual update is executed, e.g. a batch of git commands or some automatic cleanup.
function performUpdate¶
virtual expected< SolutionUpdateInfo > performUpdate(
const SolutionUpdateInfo & solutionUpdateInfo,
const std::string & solutionsDir =""
) =0
Used to perform the actual update operation.
Parameters:
- solutionUpdateInfo a structure specifying a single solution to update. Usually this is one of the structures returned by initialize()
- solutionsDir optional path to directory to search for solutions, by default this is retrieved automatically from RTCORE solutions API
Return: Output data as a single solution update info structure or an error if it occurs.
This is the main function of the updater, where the actual update is performed.
function finishUpdate¶
virtual expected< SolutionUpdateInfo > finishUpdate(
const SolutionUpdateInfo & solutionUpdateInfo,
const std::string & solutionsDir =""
) =0
Used to finish the update or perform additional operations.
Parameters:
- solutionUpdateInfo a structure specifying a single solution to update. Usually this is one of the structures returned by initialize()
- solutionsDir optional path to directory to search for solutions, by default this is retrieved automatically from RTCORE solutions API
Return: Output data as a single solution update info structure or an error if it occurs.
This is used to perform required operations after the update, e.g. to fix the issue or retry the update with different options.
function cancelUpdate¶
virtual expected< SolutionUpdateInfo > cancelUpdate(
const SolutionUpdateInfo & solutionUpdateInfo,
const std::string & solutionsDir =""
) =0
Used to cancel and rollback the update.
Parameters:
- solutionUpdateInfo a structure specifying a single solution to update. Usually this is one of the structures returned by initialize()
- solutionsDir optional path to directory to search for solutions, by default this is retrieved automatically from RTCORE solutions API
Return: Output data as a single solution update info structure or an error if it occurs.
This can be used to perform some cleanup/rollback after the update is cancelled.
function shutdown¶
virtual expected< void > shutdown() =0
Used to shut down and clean after the updater.
Return: Nothing or an error if it occurs.
This can be used to perform some cleanup before the updater is destroyed.