Spaces:
No application file
No application file
File size: 580 Bytes
6755a2d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
# -*- coding: utf8 -*-
from typing import Any
def load_rainbow_config(
app_id: str, user_id: str, secret_key: str, group: str, env_name: str = "Default"
) -> Any:
from rainbow_sdk.rainbow_client import RainbowClient
init_param = {
"connectStr": "api.rainbow.oa.com:8080",
"isUsingFileCache": False,
"fileCachePath": "/data/rainbow/",
"tokenConfig": {"app_id": app_id, "user_id": user_id, "secret_key": secret_key},
}
rc = RainbowClient(init_param)
res = rc.get_configs_v3(group, env_name=env_name)
return res["data"]
|