通过API编辑目录服务元数据

时间:2019-07-19 11:39:15

标签: consul

我有一些元数据的Consul服务。 为了显示它,我以服务JSON示例启动了dev代理,但是实际的服务已在服务器节点上注册:

[
    {
        "Address": "127.0.0.1",
        "CreateIndex": 10,
        "Datacenter": "dc1",
        "ID": "1fdb1c45-2b8f-512d-d86b-d21431ca6092",
        "ModifyIndex": 10,
        "Node": "g4s8",
        "NodeMeta": {
            "consul-network-segment": ""
        },
        "ServiceAddress": "",
        "ServiceConnect": {},
        "ServiceEnableTagOverride": false,
        "ServiceID": "dev",
        "ServiceKind": "",
        "ServiceMeta": {
            "some-key": "some-val"
        },
        "ServiceName": "example",
        "ServicePort": 1521,
        "ServiceProxy": {},
        "ServiceProxyDestination": "",
        "ServiceWeights": {
            "Passing": 1,
            "Warning": 1
        },
        "TaggedAddresses": {
            "lan": "127.0.0.1",
            "wan": "127.0.0.1"
        }
    }
]

在此示例中,是否可以使用some-key API来更改/catalog的元数据值?我在官方documentation中找不到任何相关参考。

0 个答案:

没有答案