daemon.stores.partial module
class daemon.stores.partial.PartialStore[source]
Bases: abc.ABC
A store spawned inside partial-daemon container
abstract add(\args, **kwargs*)[source]
Add a new element to the store. This method needs to be overridden by the subclass
Return type
delete()[source]
Terminates the object in the store & stops the server
Return type
None
class daemon.stores.partial.PartialPodStore[source]
Bases: daemon.stores.partial.PartialStore
A Pod store spawned inside partial-daemon container
poddeployment_constructor(args)
Build an implementation of a BasePod interface
Parameters
args (Namespace) – deployment arguments parsed from the CLI.
Return type
Type
[ForwardRef
]Returns
the created BaseDeployment
add(args, envs={}, \*kwargs*)[source]
Starts a Pod in partial-daemon
Parameters
args (
Namespace
) – namespace args for the pod/deploymentenvs (
Optional
[Dict
]) – environment variables to be passed into partial pod/deploymentkwargs – keyword args
Return type
Returns
Item describing the Pod object
class daemon.stores.partial.PartialDeploymentStore[source]
Bases: daemon.stores.partial.PartialPodStore
A Deployment store spawned inside partial-daemon container
poddeployment_constructor
async rolling_update(uses_with=None)[source]
Perform rolling_update on current Deployment
Parameters
uses_with (
Optional
[Dict
]) – a Dictionary of arguments to restart the executor withReturn type
Returns
Item describing the Flow object
async scale(replicas)[source]
Scale the current Deployment :type replicas:
int
:param replicas: number of replicas for the Deployment :rtype: PartialStoreItem :return: Item describing the Flow object
class daemon.stores.partial.PartialFlowStore[source]
Bases: daemon.stores.partial.PartialStore
A Flow store spawned inside partial-daemon container
add(args, port_mapping=None, envs={}, \*kwargs*)[source]
Starts a Flow in partial-daemon.
Parameters
args (
Namespace
) – namespace args for the flowport_mapping (
Optional
[PortMappings]) – ports to be setenvs (
Optional
[Dict
]) – environment variables to be passed into partial flowkwargs – keyword args
Return type
Returns
Item describing the Flow object
async rolling_update(deployment_name, uses_with=None)[source]
Perform rolling_update on the Deployment in current Flow
Parameters
deployment_name (
str
) – Deployment in the Flow to be rolling updateduses_with (
Optional
[Dict
]) – a Dictionary of arguments to restart the executor with
Return type
Returns
Item describing the Flow object
async scale(deployment_name, replicas)[source]
Scale the Deployment in current Flow :type deployment_name:
str
:param deployment_name: Deployment to be scaled :type replicas:int
:param replicas: number of replicas for the Deployment :rtype: PartialFlowItem :return: Item describing the Flow object