| syntax = "proto3"; |
| |
| package dubbo.mesh.v1alpha1; |
| |
| option go_package = "github.com/apache/dubbo-kubernetes/api/mesh/v1alpha1"; |
| |
| import "api/mesh/options.proto"; |
| |
| service MetadataService { |
| rpc MetadataRegister(MetaDataRegisterRequest) |
| returns (MetaDataRegisterResponse); |
| rpc MetadataSync(stream MetadataSyncRequest) |
| returns (stream MetadataSyncResponse); |
| } |
| |
| message MetaDataRegisterRequest { |
| string podName = 1; // dubbo的应用实例名, 由sdk通过环境变量获取 |
| MetaData metadata = 2; // 上报的元数据 |
| } |
| |
| message MetaDataRegisterResponse { |
| bool success = 1; |
| string message = 2; |
| } |
| |
| // 可以根据应用名和版本号进行获取 |
| message MetadataSyncRequest { |
| string nonce = 1; |
| string applicationName = 2; |
| string revision = 3; |
| } |
| |
| message MetadataSyncResponse { |
| string nonce = 1; |
| int64 revision = 2; |
| repeated MetaData metaDatum = 3; |
| } |
| |
| message MetaData { |
| option (dubbo.mesh.resource).name = "MetaDataResource"; |
| option (dubbo.mesh.resource).type = "MetaData"; |
| option (dubbo.mesh.resource).package = "mesh"; |
| option (dubbo.mesh.resource).dds.send_to_zone = true; |
| option (dubbo.mesh.resource).ws.name = "metadata"; |
| option (dubbo.mesh.resource).ws.plural = "metadatas"; |
| option (dubbo.mesh.resource).allow_to_inspect = true; |
| |
| string app = 1; |
| string revision = 2; |
| // key format is '{group}/{interface name}:{version}:{protocol}' |
| map<string, ServiceInfo> services = 3; |
| } |
| |
| message ServiceInfo { |
| string name = 1; |
| string group = 2; |
| string version = 3; |
| string protocol = 4; |
| int64 port = 5; |
| string path = 6; |
| map<string, string> params = 7; |
| } |