コード例 #1
0
ファイル: api.py プロジェクト: yangjun1994/polyaxon
def get_api_location_config(resolver: str, auth=str):
    service = get_service_url(
        host=settings.PROXIES_CONFIG.api_host, port=settings.PROXIES_CONFIG.api_port,
    )
    if not settings.PROXIES_CONFIG.auth_external:
        auth = ""
    return get_config(options=OPTIONS, service=service, resolver=resolver, auth=auth)
コード例 #2
0
def get_streams_location_config(resolver: str, auth: str):
    service = get_service_url(
        host=settings.PROXIES_CONFIG.streams_host,
        port=settings.PROXIES_CONFIG.streams_port,
    )
    return get_config(options=OPTIONS,
                      resolver=resolver,
                      auth=auth,
                      service=service)
コード例 #3
0
ファイル: auth.py プロジェクト: yangjun1994/polyaxon
def get_auth_location_config(resolver: str):
    service = settings.PROXIES_CONFIG.auth_external or get_service_url(
        host=settings.PROXIES_CONFIG.api_host, port=settings.PROXIES_CONFIG.api_port,
    )
    if not settings.PROXIES_CONFIG.auth_use_resolver:
        resolver = ""
    return get_config(
        options=AUTH_LOCATION_CONFIG if settings.PROXIES_CONFIG.auth_enabled else "",
        indent=0,
        service=service,
        auth_api=AUTH_API,
        resolver=resolver,
    )
コード例 #4
0
def get_api_location_config(resolver: str, auth=str):
    service = get_service_url(
        host=settings.PROXIES_CONFIG.api_host,
        port=settings.PROXIES_CONFIG.api_port,
    )
    if not settings.PROXIES_CONFIG.api_use_resolver:
        resolver = ""
    if not settings.PROXIES_CONFIG.auth_external:
        auth = ""
    return get_config(
        options=OPTIONS,
        service=service,
        resolver=resolver,
        auth=auth,
        ssl_server_name=get_ssl_server_name(service),
        header_host=get_header_host(service),
    )