caikit.interfaces.common.data_model.remote ========================================== .. py:module:: caikit.interfaces.common.data_model.remote .. autoapi-nested-parse:: This file contains interfaces required to connect to Remote servers Attributes ---------- .. autoapisummary:: caikit.interfaces.common.data_model.remote.log caikit.interfaces.common.data_model.remote.error Classes ------- .. autoapisummary:: caikit.interfaces.common.data_model.remote.ConnectionTlsInfo caikit.interfaces.common.data_model.remote.ConnectionInfo Module Contents --------------- .. py:data:: log .. py:data:: error .. py:class:: ConnectionTlsInfo Bases: :py:obj:`caikit.core.data_model.DataObjectBase` Helper dataclass to store information regarding TLS information. .. py:attribute:: enabled :type: bool :value: False .. py:attribute:: insecure_verify :type: bool :value: False .. py:attribute:: ca_file :type: Optional[str] .. py:attribute:: cert_file :type: Optional[str] .. py:attribute:: key_file :type: Optional[str] .. py:property:: mtls_enabled :type: bool Helper property to identify if mtls is enabled .. py:attribute:: _private_slots :value: ('_ca_data', '_cert_data', '_key_data') .. py:property:: ca_data :type: Optional[bytes] .. py:property:: key_data :type: Optional[bytes] .. py:property:: cert_data :type: Optional[bytes] .. py:method:: __post_init__() Post init function to verify field types and arguments .. py:method:: verify_ssl_data() Helper function to verify all TLS data was read correctly. Raises: FileNotFoundError: If any of the tls files were provided but could not be found .. py:class:: ConnectionInfo Bases: :py:obj:`caikit.core.data_model.DataObjectBase` DataClass to store information regarding an external connection. This includes the hostname, port, tls, and timeout settings .. py:attribute:: hostname :type: str .. py:attribute:: port :type: Optional[int] :value: None .. py:attribute:: tls :type: Optional[ConnectionTlsInfo] .. py:attribute:: timeout :type: Optional[int] :value: 60 .. py:attribute:: options :type: Optional[caikit.core.data_model.json_dict.JsonDict] .. py:attribute:: retries :type: Optional[int] :value: 1 .. py:attribute:: retry_options :type: Optional[caikit.core.data_model.json_dict.JsonDict] .. py:attribute:: max_session_age :type: Union[float, int] :value: -1 .. py:method:: __post_init__() Post init function to verify field types and set defaults