The server_factory.py
module#
Summary#
Defines available communication protocols. |
|
Manage DPF Docker configuration and communication. |
|
Provides an instance of ServerConfig object to manage the server type used. |
|
Define available server configurations. |
|
Holds all the configuration options and the process information of a running Docker image of a DPF server. |
|
Factory for server type choice depending on current configuration. |
Return the default configuration depending on the server version. |
|
Return the default configuration for gRPC communication. |
|
Return a docker configuration instance. |
Description#
Server factory, server configuration and communication protocols.
Contains the server factory as well as the communication protocols and server configurations available.
Module detail#
- server_factory.get_default_server_config(server_lower_than_or_equal_to_0_3: bool = False, docker_config: DockerConfig = None)#
Return the default configuration depending on the server version.
if ansys.dpf.core.SERVER_CONFIGURATION is not None, then this variable is taken
if server_lower_than_or_equal_to_0_3 is True, then LegacyGrpcServer is taken
if DPF_SERVER_TYPE environment variable is set to
INPROCESS
,GRPC
, orLEGACYGRPC
, then this variable is takenelse DEFAULT_COMMUNICATION_PROTOCOL and DEFAULT_LEGACY are used.
- Raises:
If DPF_SERVER_TYPE environment variable is set to unknown value. –
- server_factory.get_default_remote_server_config()#
Return the default configuration for gRPC communication.
Follows get_default_server_config
- Raises:
If DPF_SERVER_TYPE environment variable is set to unknown value. –
- server_factory.create_default_docker_config() DockerConfig #
Return a docker configuration instance.
- server_factory.DEFAULT_COMMUNICATION_PROTOCOL#
- server_factory.DEFAULT_LEGACY = False#