def create_pool(cls, backend:str, config_path: str, role: str = "scheduler", **kwargs)

Function

Creates a specific MemPool instance based on the configuration.

Prototype

def create_pool(cls, backend: str, config_path: str, role: str = "scheduler", **kwargs):

Parameters

Parameter

Type

Description

backend

String

Pooling backend. Currently, only mooncake is supported.

config_path

String

Configuration file path (for example, JSON).

role

String

Role ID, such as scheduler or worker, which affects the connection mode or permission.

**kwargs

-

Extended parameters (such as timeout, maximum concurrency, and namespace) passed to the underlying implementation or factory.

Return Value

MemPool instance (returned by CreatePool(backend, config_path, role, **kwargs)).