syntax = "proto3";

package dubbo.mesh.v1alpha1;

option go_package = "github.com/apache/dubbo-admin/api/mesh/v1alpha1";

import "api/mesh/options.proto";

// RPCInstance is retrieved from Discovery, defines the attributes of instance during service discovery and rpc call
message RPCInstance {
  option (dubbo.mesh.resource).name = "RPCInstance";
  option (dubbo.mesh.resource).plural_name = "RPCInstances";
  option (dubbo.mesh.resource).package = "mesh";
  option (dubbo.mesh.resource).is_experimental = true;

  string name = 1;

  string ip = 2;

  int64 port = 3;

  string appName = 5;

  string registerTime = 6;

  // TODO, we need to sort out the status of an instance
  string unregisterTime = 7;

  string revision = 8;

  string metadataStorageType = 9;

  string releaseVersion = 10;

  string protocol = 11;

  string serialization = 12;

  string preferSerialization = 13;

  map<string, string> tags = 51;

  repeated Endpoint endpoints = 52;

  map<string, string> metadata = 53;

  reserved 15 to 50;
}

message Endpoint{
  int64 port = 1;

  string protocol= 2;
}