@@ -764,9 +764,22 @@ def on_truncated(name: str) -> None:
764
764
765
765
766
766
class TlsOptions :
767
+ """
768
+ Options specific to the configuration of TLS.
769
+ """
770
+
767
771
ENV_CA_CERT = "COHERENCE_TLS_CERTS_PATH"
772
+ """
773
+ Environment variable to configure the path to CA certificates
774
+ """
768
775
ENV_CLIENT_CERT = "COHERENCE_TLS_CLIENT_CERT"
776
+ """
777
+ Environment variable to configure the path to client certificates
778
+ """
769
779
ENV_CLIENT_KEY = "COHERENCE_TLS_CLIENT_KEY"
780
+ """
781
+ Environment variable to configure the path to client key
782
+ """
770
783
771
784
def __init__ (
772
785
self ,
@@ -776,6 +789,18 @@ def __init__(
776
789
client_cert_path : str | None = None ,
777
790
client_key_path : str | None = None ,
778
791
) -> None :
792
+ """
793
+ Construct a new :func:`coherence.client.TlsOptions`
794
+
795
+ :param locked: If `true`, prevents further mutations to the options.
796
+ :param enabled: Enable/disable TLS support.
797
+ :param ca_cert_path: the path to the CA certificate. If not specified then its configured using the
798
+ environment variable COHERENCE_TLS_CERTS_PATH
799
+ :param client_cert_path: the path to the client certificate. If not specified then its configured using the
800
+ environment variable COHERENCE_TLS_CLIENT_CERT
801
+ :param client_key_path: the path to the client certificate key. If not specified then its configured using the
802
+ environment variable COHERENCE_TLS_CLIENT_KEY
803
+ """
779
804
self ._locked = locked
780
805
self ._enabled = enabled
781
806
@@ -787,6 +812,9 @@ def __init__(
787
812
788
813
@property
789
814
def enabled (self ) -> bool :
815
+ """
816
+ Property to set/get the boolean state if TLS is enabled(true) or disabled(false)
817
+ """
790
818
return self ._enabled
791
819
792
820
@enabled .setter
@@ -798,6 +826,9 @@ def enabled(self, enabled: bool) -> None:
798
826
799
827
@property
800
828
def ca_cert_path (self ) -> Optional [str ]:
829
+ """
830
+ Property to set/get the path to the CA certificate
831
+ """
801
832
return self ._ca_cert_path
802
833
803
834
@ca_cert_path .setter
@@ -809,6 +840,9 @@ def ca_cert_path(self, ca_cert_path: str) -> None:
809
840
810
841
@property
811
842
def client_cert_path (self ) -> Optional [str ]:
843
+ """
844
+ Property to set/get the path to the client certificate.
845
+ """
812
846
return self ._client_cert_path
813
847
814
848
@client_cert_path .setter
@@ -820,6 +854,9 @@ def client_cert_path(self, client_cert_path: str) -> None:
820
854
821
855
@property
822
856
def client_key_path (self ) -> Optional [str ]:
857
+ """
858
+ Property to set/get the path to the client certificate key.
859
+ """
823
860
return self ._client_key_path
824
861
825
862
@client_key_path .setter
@@ -830,6 +867,9 @@ def client_key_path(self, client_key_path: str) -> None:
830
867
self ._client_key_path = client_key_path
831
868
832
869
def locked (self ) -> None :
870
+ """
871
+ Once called, no further mutations can be made.
872
+ """
833
873
self ._locked = True
834
874
835
875
def is_locked (self ) -> bool :
0 commit comments