MCPcopy Create free account
hub / github.com/MagicStack/asyncpg / get_server_settings

Method get_server_settings

tests/test_connect.py:2032–2044  ·  view source on GitHub ↗
(cls)

Source from the content-addressed store, hash-verified

2030
2031 @classmethod
2032 def get_server_settings(cls):
2033 conf = super().get_server_settings()
2034 conf.update({
2035 'ssl': 'on',
2036 'ssl_cert_file': SSL_CERT_FILE,
2037 'ssl_key_file': SSL_KEY_FILE,
2038 'ssl_ca_file': CLIENT_CA_CERT_FILE,
2039 })
2040 if cls.cluster.get_pg_version() >= (12, 0):
2041 conf['ssl_min_protocol_version'] = 'TLSv1.2'
2042 conf['ssl_max_protocol_version'] = 'TLSv1.2'
2043
2044 return conf
2045
2046 @classmethod
2047 def setup_cluster(cls):

Callers

nothing calls this directly

Calls 2

get_pg_versionMethod · 0.80
get_server_settingsMethod · 0.45

Tested by

no test coverage detected