-
Notifications
You must be signed in to change notification settings - Fork 12.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
【OpenApi】How to listen the config change based on the 2.x version nacos?【Implementing a v2.x nacos python sdk】 #12094
Comments
The import nacos
SERVER_ADDRESSES = "server addresses split by comma"
NAMESPACE = "namespace id"
client = nacos.NacosClient(SERVER_ADDRESSES, namespace=NAMESPACE)
data_id = "config.nacos"
group = "group"
def listen(args):
print(args)
client.add_config_watcher(data_id, group, listen) |
@Daydreamer-ia As you mentioned, nacos 2.x support grpc. I think it is a nice feature evovled from v1.x to v2.x, and I do know something about grpc(not too much). As far as I know, the grpc requires a proto file to auto generate code for different language, where can I found the proto file of nacos? |
api/src/main/proto/nacos_grpc_service.proto |
By the way, does the method to send heartbeat in nacos 2.x changed? The OpenAPI V2.x document does not have any hints about how to send heartbeat. However, I tried |
Describe the bug
I am working on a nacos 2.x python sdk. Based on the OpenAPI V2.x document , I cannot find any records related to the config listener.
Only the following Apis are found
Get Setting
Create Setting
Delete Setting
Get the history setting list
Get a specific version setting
Get the last version setting
Get all setting of a namespace
Expected behavior
To support other language like python, can use nacos to register service, the v2 document should have api to listen the config change.
Actually behavior
I tried the v1 path, it can have response.
path: /nacos/v1/cs/configs/listener
response: data_id%02group_name%02name_space%01
How to Reproduce
Steps to reproduce the behavior:
The text was updated successfully, but these errors were encountered: