Dobby  3.0
Dobby “Docker based Thingy” is a tool for managing and running OCI containers using crun
Public Member Functions | List of all members
RdkPluginBase Class Reference

Basic object that provides the default overrides for a plugin. More...

#include <DobbyLoggerBase.h>

Inheritance diagram for RdkPluginBase:
Inheritance graph
[legend]
Collaboration diagram for RdkPluginBase:
Collaboration graph
[legend]

Public Member Functions

virtual bool postInstallation ()
 
virtual bool preCreation ()
 
virtual bool createRuntime ()
 
virtual bool createContainer ()
 
virtual bool postStart ()
 
virtual bool postHalt ()
 
virtual bool postStop ()
 
std::vector< std::string > getDependencies () const override
 Should return the names of the plugins this plugin depends on. More...
 
- Public Member Functions inherited from IDobbyRdkPlugin
virtual std::string name () const =0
 Should return the name of the plugin. More...
 
virtual unsigned hookHints () const =0
 Should return a bitfield of the hook points implemented by the plugin. More...
 

Additional Inherited Members

- Public Types inherited from IDobbyRdkPlugin
enum  HintFlags : unsigned {
  PostInstallationFlag = (1 << 0) , PreCreationFlag = (1 << 1) , CreateRuntimeFlag = (1 << 2) , CreateContainerFlag = (1 << 3) ,
  PostStartFlag = (1 << 5) , PostHaltFlag = (1 << 6) , PostStopFlag = (1 << 7) , Unknown = 0
}
 Bit flags that should be returned by hookHints. More...
 

Detailed Description

Basic object that provides the default overrides for a plugin.

This class just saves the plugins from having to implement hook functions that are not needed.

Member Function Documentation

◆ createContainer()

virtual bool RdkPluginBase::createContainer ( )
inlinevirtual

Hook Name: createContainer Hook Execution Namespace: container Hook Path Resolution: host

Execution: OCI Runtime (runc/crun)

Hook Description: Run during the create operation, after the runtime environment has been created and before the pivot root or any equivalent operation.

This would run before the pivot_root operation is executed but after the mount namespace was created and setup.

Implements IDobbyRdkPlugin.

Reimplemented in TestRdkPlugin, and Storage.

◆ createRuntime()

virtual bool RdkPluginBase::createRuntime ( )
inlinevirtual

Hook Name: createRuntime Hook Execution Namespace: host Hook Path Resolution: host

Execution: OCI Runtime (runc/crun)

Hook Description: Run during the create operation, after the runtime environment has been created and before the pivot root or any equivalent operation.

Called after the container namespaces are created, so provides an opportunity to customize the container (e.g. the network namespace could be specified in this hook).

Implements IDobbyRdkPlugin.

Reimplemented in TestRdkPlugin, Storage, RtSchedulingPlugin, NetworkingPlugin, IonMemoryPlugin, GpuPlugin, AppServicesRdkPlugin, and ThunderPlugin.

◆ getDependencies()

std::vector<std::string> RdkPluginBase::getDependencies ( ) const
inlineoverridevirtual

Should return the names of the plugins this plugin depends on.

This can be used to determine the order in which the plugins should be processed when running hooks.

Returns
Names of the plugins this plugin depends on.

Implements IDobbyRdkPlugin.

Reimplemented in ThunderPlugin, TestRdkPlugin, Storage, RtSchedulingPlugin, OOMCrash, NetworkingPlugin, Minidump, LocalTimePlugin, IpcPlugin, HttpProxyPlugin, GpuPlugin, GamepadPlugin, and DeviceMapperPlugin.

◆ postHalt()

virtual bool RdkPluginBase::postHalt ( )
inlinevirtual

Hook Name: postHalt Hook Execution Namespace: host Hook Path Resolution: host

Execution: Dobby

Hook Description: When a SIGTERM signal is received from the container. Before the delete operation is called

For example, this hook could perform clean up when a container closes

Implements IDobbyRdkPlugin.

Reimplemented in TestRdkPlugin, OOMCrash, NetworkingPlugin, Minidump, HttpProxyPlugin, AppServicesRdkPlugin, and ThunderPlugin.

◆ postInstallation()

virtual bool RdkPluginBase::postInstallation ( )
inlinevirtual

Hook Name: postInstallation Hook Execution Namespace: host Hook Path Resolution: host

Execution: Dobby

Hook Description: Runs after the OCI bundle has been downloaded to the client STB, before the runtime’s create operation is called. This hook is called only once in lifecycle of container.

Implements IDobbyRdkPlugin.

Reimplemented in TestRdkPlugin, RtSchedulingPlugin, OOMCrash, NetworkingPlugin, LocalTimePlugin, IpcPlugin, HttpProxyPlugin, GamepadPlugin, AppServicesRdkPlugin, and ThunderPlugin.

◆ postStart()

virtual bool RdkPluginBase::postStart ( )
inlinevirtual

Hook Name: postStart Hook Execution Namespace: host Hook Path Resolution: host

Execution: OCI Runtime (runc/crun)

Hook Description: Runs after the user-specified process is executed but before the start operation returns.

For example, this hook can notify the user that the container process is spawned.

Implements IDobbyRdkPlugin.

Reimplemented in TestRdkPlugin, and Storage.

◆ postStop()

virtual bool RdkPluginBase::postStop ( )
inlinevirtual

Hook Name: postStop Hook Execution Namespace: host Hook Path Resolution: host

Execution: OCI Runtime (runc/crun)

Hook Description: After the container is deleted but before the delete operation returns.

This hook has a confusing name due to to the stateless nature of OCI runtimes - is relates to the OCI DELETE operation so won't be run until crun delete is called

Implements IDobbyRdkPlugin.

Reimplemented in TestRdkPlugin, Storage, NetworkingPlugin, IonMemoryPlugin, and GpuPlugin.

◆ preCreation()

virtual bool RdkPluginBase::preCreation ( )
inlinevirtual

Hook Name: preCreation Hook Execution Namespace: host Hook Path Resolution: host

Execution: Dobby

Hook Description: Runs before the runtime’s create operation is called. This hook runs every time container need to be created.

Implements IDobbyRdkPlugin.

Reimplemented in TestRdkPlugin, Storage, Minidump, LocalTimePlugin, HttpProxyPlugin, DeviceMapperPlugin, and ThunderPlugin.


The documentation for this class was generated from the following file: