TaskD Proxy APIs

def init_taskd_proxy(config : dict) -> bool:

Function Description

The user-side code calls this function to initialize TaskD Proxy.

Input Parameters

Table 1 Parameter description

Parameter Type Description
config dict:{str : str} TaskD Proxy configuration information, including TaskD Proxy configuration and network configuration.
  • ListenAddr: TaskD Proxy listening IP
  • ListenPort: TaskD Proxy listening port
  • UpstreamAddr: Upstream IP address on the network side
  • UpstreamPort: Upstream port on the network side
  • ServerRank: TaskD Proxy rank number

Return Value

Table 2 Return value description

Return Value Type Description
bool Indicates whether the initialization is successful.
  • True: The initialization is successful.
  • False: The initialization fails.

def destroy_taskd_proxy() -> bool:

Function Description

The user-side code calls this function to destroy TaskD Proxy. This function must be used after init_taskd_proxy is called.

Input Parameters

None

Return Value Description

Table 1 Return value description

Return Value Type Description
bool Indicates whether the destruction is successful.
  • True: The destruction is successful.
  • False: The destruction fails.