All Downloads are FREE. Search and download functionalities are using the official Maven repository.

olaris.polaris-all.2.0.0.0.source-code.lossless.proto Maven / Gradle / Ivy

There is a newer version: 2.0.1.0-RC1
Show newest version
syntax = "proto3";

package v1;

option go_package = "github.com/polarismesh/specification/source/go/api/v1/traffic_manage";
option java_package = "com.tencent.polaris.specification.api.v1.traffic.manage";
option java_outer_classname = "LosslessProto";

// 优雅上下线规则的模型
message LosslessRule {
  // rule id
  string id = 1 [ json_name = "id" ];
  // service for rule belongs to
  string service = 2 [ json_name = "service" ];
  // namespace for rule belongs to
  string namespace = 3 [ json_name = "namespace" ];
  // revision routing version
  string revision = 4 [ json_name = "revision" ];
  // ctime create time of the rules
  string ctime = 5 [ json_name = "ctime" ];
  // mtime modify time of the rules
  string mtime = 6 [ json_name = "mtime" ];
  // configuration for lossless online
  LosslessOnline losslessOnline = 7 [ json_name = "lossless_online" ];
  // configuration for lossless offline
  LosslessOffline losslessOffline = 8 [ json_name = "lossless_offline" ];
  // rule labels
  map metadata = 9 [ json_name = "metadata" ];
  // 操作标志位
  bool editable = 30 [ json_name = "editable" ];
  bool deleteable = 31 [ json_name = "deleteable" ];
}

message LosslessOnline {
  // configuration for delayRegister
  DelayRegister delayRegister = 1 [ json_name = "delay_register" ];
  // configuration for warmup
  Warmup warmup = 2 [ json_name = "warmup" ];
  // configuration for readiness probe
  Readiness readiness = 3 [ json_name = "readiness" ];
}

message DelayRegister {
  // enable delay registry
  bool enable = 1 [ json_name = "enable" ];
  enum DelayStrategy {
    // register instance after delay specific time
    DELAY_BY_TIME = 0;
    // register instance until health check successfully
    DELAY_BY_HEALTH_CHECK = 1;
  }
  // delay register strategy
  DelayStrategy strategy = 2 [ json_name = "strategy" ];
  // delay register time by second, active when strategy == DELAY_BY_TIME
  int32 intervalSecond = 3 [ json_name = "interval_second" ];
  // protocol to do health check, default http, active when strategy == DELAY_BY_HEALTH_CHECK
  string healthCheckProtocol = 4 [ json_name = "health_check_protocol" ];
  // method to do health check, default GET, active when strategy == DELAY_BY_HEALTH_CHECK
  string healthCheckMethod = 5 [ json_name = "health_check_method" ];
  // path to do health check, no default value, active when strategy == DELAY_BY_HEALTH_CHECK
  string healthCheckPath = 6 [ json_name = "health_check_path" ];
  // health check interval second, default is 30, active when strategy == DELAY_BY_HEALTH_CHECK
  string healthCheckIntervalSecond = 7 [ json_name = "health_check_interval_second" ];
}

message Warmup {
  // enable warmup
  bool enable = 1 [ json_name = "enable" ];
  // total warmup interval by second
  int32 intervalSecond = 2 [ json_name = "interval_second" ];
  // warmup stop when most of the instances in service are in warmup status
  bool enableOverloadProtection = 3 [ json_name = "enable_overload_protection" ];
  // the threshold to active overload protection, default is 50, threshld = sum(WarmupInstances)/sum(AllInstances)*100
  int32 overloadProtectionThreshold = 4 [ json_name = "overload_protection_threshold" ];
  // curvature for warmup register, default is 1
  int32 curvature = 5 [ json_name = "curvature" ];
}

message Readiness {
  // enable /readiness expose
  bool enable = 1 [ json_name = "enable" ];
}

message LosslessOffline {
  // enable /offline expose
  bool enable = 1 [ json_name = "enable" ];
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy