utils
drunc.process_manager.utils
Classes
Functions
get_pm_type_from_name(pm_name)
Get the ProcessManagerTypes enum value from a string name.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
pm_name
|
str
|
The name of the process manager type (e.g., "SSH", "K8s"). |
required |
Returns:
| Name | Type | Description |
|---|---|---|
ProcessManagerTypes |
ProcessManagerTypes
|
The corresponding enum value. |
Source code in drunc/process_manager/utils.py
on_parent_exit(signum)
Return a function to be run in a child process which will trigger SIGNAME to be sent when the parent process dies
Source code in drunc/process_manager/utils.py
validate_k8s_session_name(session)
Validate that the session/namespace name is valid according to RFC1123 label standard.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
session
|
str
|
The session/namespace name to validate. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
bool |
bool
|
True if the session name is valid, False otherwise. |