ConnectorEnvironment
Configure a connector environment for custom Flyte connectors.
Attributes
| Attribute | Type | Description |
|---|---|---|
| type | string = "connector" | The fixed identifier for the environment type, set to "connector" to distinguish it from other application environments. |
| port | `int | Port` = Port(port=8080, name="h2c") |
Constructor
Signature
def ConnectorEnvironment(
include: List[str],
name: str,
image: str,
port: int | Port = Port(port=8080, name="h2c")
) - > null
Parameters
| Name | Type | Description |
|---|---|---|
| include | List[str] | List of file paths to connector modules to be converted to Python module names. |
| name | str | The name of the connector environment. |
| image | str | The container image to use for the connector. |
| port | `int | Port` = Port(port=8080, name="h2c") |
Methods
container_args()
@classmethod
def container_args(
serialize_context: [SerializationContext](../../../models/serializationcontext.md?sid=flyte_models_serializationcontext)
) - > List[str]
Generates the command-line arguments for the connector container, including port configurations and the list of Python modules to load.
Parameters
| Name | Type | Description |
|---|---|---|
| serialize_context | [SerializationContext](../../../models/serializationcontext.md?sid=flyte_models_serializationcontext) | The context object containing settings and state for the current serialization pass. |
Returns
| Type | Description |
|---|---|
List[str] | A list of strings representing the CLI arguments, such as port numbers and dotted module names derived from the include paths. |
container_cmd()
@classmethod
def container_cmd(
serialize_context: [SerializationContext](../../../models/serializationcontext.md?sid=flyte_models_serializationcontext),
parameter_overrides: list[[Parameter](../../parameter/parameter.md?sid=flyte_app__parameter_parameter)]| None = None
) - > List[str]
Determines the entrypoint command for the container by parsing the user-provided command or falling back to the parent class default.
Parameters
| Name | Type | Description |
|---|---|---|
| serialize_context | [SerializationContext](../../../models/serializationcontext.md?sid=flyte_models_serializationcontext) | The context object containing settings and state for the current serialization pass. |
| parameter_overrides | `list[Parameter] | None` = None |
Returns
| Type | Description |
|---|---|
List[str] | A list of strings representing the command to execute when the container starts. |