ConfigManagerService

  • gRPC服务地址:/fusion.discoveryx.server.grpc.ConfigManagerService
  • REST URL前缀:/fusion/discoveryx/console/config

REST URL路径由 REST URL前缀 + 服务名组织,均使用 POST 方法的请求,JSON序例化格式。如查询配置列表接口访问地址为:POST /fusion/discoveryx/management/config/ListConfig。Protobuf与JSON格式转换请参阅: JSON 说明

ListConfig

gRPC

// Query configs(Will not return config content)
rpc ListConfig (fusion.discoveryx.server.protocol.ListConfig) returns (fusion.discoveryx.server.protocol.ConfigResponse) {
}

请求

message ListConfig {
    string namespace = 1;
    // 支持模糊查询
    google.protobuf.StringValue data_id = 2;
    // 支持模糊查询
    google.protobuf.StringValue group_name = 3;
    int32 page = 4;
    int32 size = 5;
    repeated string tags = 6;
}

响应

message ConfigResponse {
    int32 status = 1;
    string message = 2;
    oneof data {
        fusion.discoveryx.model.ConfigQueried listed = 3;
        fusion.discoveryx.model.ConfigItem config = 4;
    }
}

oneof字段listed有效:

enum ConfigType {
    TEXT = 0;
    HOCON = 1;
    JSON = 2;
    YAML = 3;
    PROPERTIES = 4;
    INI = 5;
}

message ConfigBasic {
    string data_id = 1;
    string group_name = 2;
    ConfigType type = 3;
}
message ConfigQueried {
    repeated ConfigBasic configs = 1;
    string namespace = 2;
    int32 page = 3;
    int32 size = 4;
    int32 total_elements = 5;
}

GetConfig

GetConfig

PublishConfig

PublishConfig

RemoveConfig

RemoveConfig

在此文档中发现错误?该页面的源代码可以在 这里 找到。欢迎随时编辑并提交Pull Request。