Documentation ¶
Index ¶
- Variables
- func CalcCode(rm ResponseMessage) int
- func RegisterPolarisGRPCServer(s *grpc.Server, srv PolarisGRPCServer)
- type BatchQueryResponse
- func (*BatchQueryResponse) Descriptor() ([]byte, []int)
- func (m *BatchQueryResponse) GetAmount() uint32
- func (m *BatchQueryResponse) GetCode() uint32
- func (m *BatchQueryResponse) GetData() []*any.Any
- func (m *BatchQueryResponse) GetInfo() string
- func (m *BatchQueryResponse) GetSize() uint32
- func (*BatchQueryResponse) ProtoMessage()
- func (m *BatchQueryResponse) Reset()
- func (m *BatchQueryResponse) String() string
- func (m *BatchQueryResponse) XXX_DiscardUnknown()
- func (m *BatchQueryResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *BatchQueryResponse) XXX_Merge(src proto.Message)
- func (m *BatchQueryResponse) XXX_Size() int
- func (m *BatchQueryResponse) XXX_Unmarshal(b []byte) error
- type BatchWriteResponse
- func (b *BatchWriteResponse) Collect(response *Response)
- func (b *BatchWriteResponse) CollectBatch(response []*Response)
- func (*BatchWriteResponse) Descriptor() ([]byte, []int)
- func (m *BatchWriteResponse) GetCode() uint32
- func (m *BatchWriteResponse) GetInfo() string
- func (m *BatchWriteResponse) GetResponses() []*Response
- func (m *BatchWriteResponse) GetSize() uint32
- func (*BatchWriteResponse) ProtoMessage()
- func (m *BatchWriteResponse) Reset()
- func (m *BatchWriteResponse) String() string
- func (m *BatchWriteResponse) XXX_DiscardUnknown()
- func (m *BatchWriteResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *BatchWriteResponse) XXX_Merge(src proto.Message)
- func (m *BatchWriteResponse) XXX_Size() int
- func (m *BatchWriteResponse) XXX_Unmarshal(b []byte) error
- type Destination
- func (*Destination) Descriptor() ([]byte, []int)
- func (m *Destination) GetIsolate() bool
- func (m *Destination) GetLabels() map[string]*MatchString
- func (m *Destination) GetName() string
- func (m *Destination) GetNamespace() string
- func (m *Destination) GetPriority() uint32
- func (m *Destination) GetService() string
- func (m *Destination) GetTransfer() string
- func (m *Destination) GetWeight() uint32
- func (*Destination) ProtoMessage()
- func (m *Destination) Reset()
- func (m *Destination) String() string
- func (m *Destination) XXX_DiscardUnknown()
- func (m *Destination) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *Destination) XXX_Merge(src proto.Message)
- func (m *Destination) XXX_Size() int
- func (m *Destination) XXX_Unmarshal(b []byte) error
- type DiscoverRequest
- func (*DiscoverRequest) Descriptor() ([]byte, []int)
- func (m *DiscoverRequest) GetSerivce() *Service
- func (m *DiscoverRequest) GetType() DiscoverRequest_DiscoverRequestType
- func (*DiscoverRequest) ProtoMessage()
- func (m *DiscoverRequest) Reset()
- func (m *DiscoverRequest) String() string
- func (m *DiscoverRequest) XXX_DiscardUnknown()
- func (m *DiscoverRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *DiscoverRequest) XXX_Merge(src proto.Message)
- func (m *DiscoverRequest) XXX_Size() int
- func (m *DiscoverRequest) XXX_Unmarshal(b []byte) error
- type DiscoverRequest_DiscoverRequestType
- type DiscoverResponse
- func (*DiscoverResponse) Descriptor() ([]byte, []int)
- func (m *DiscoverResponse) GetCode() uint32
- func (m *DiscoverResponse) GetInfo() string
- func (m *DiscoverResponse) GetRoutings() []*Routing
- func (m *DiscoverResponse) GetService() *Service
- func (m *DiscoverResponse) GetType() DiscoverResponse_DiscoverResponseType
- func (*DiscoverResponse) ProtoMessage()
- func (m *DiscoverResponse) Reset()
- func (m *DiscoverResponse) String() string
- func (m *DiscoverResponse) XXX_DiscardUnknown()
- func (m *DiscoverResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *DiscoverResponse) XXX_Merge(src proto.Message)
- func (m *DiscoverResponse) XXX_Size() int
- func (m *DiscoverResponse) XXX_Unmarshal(b []byte) error
- type DiscoverResponse_DiscoverResponseType
- type FlowStaining
- func (*FlowStaining) Descriptor() ([]byte, []int)
- func (m *FlowStaining) GetId() string
- func (m *FlowStaining) GetName() string
- func (m *FlowStaining) GetRules() []*StaineRule
- func (*FlowStaining) ProtoMessage()
- func (m *FlowStaining) Reset()
- func (m *FlowStaining) String() string
- func (m *FlowStaining) XXX_DiscardUnknown()
- func (m *FlowStaining) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *FlowStaining) XXX_Merge(src proto.Message)
- func (m *FlowStaining) XXX_Size() int
- func (m *FlowStaining) XXX_Unmarshal(b []byte) error
- type MatchString
- func (*MatchString) Descriptor() ([]byte, []int)
- func (m *MatchString) GetType() MatchString_MatchStringType
- func (m *MatchString) GetValue() *wrappers.StringValue
- func (m *MatchString) GetValueType() MatchString_ValueType
- func (*MatchString) ProtoMessage()
- func (m *MatchString) Reset()
- func (m *MatchString) String() string
- func (m *MatchString) XXX_DiscardUnknown()
- func (m *MatchString) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *MatchString) XXX_Merge(src proto.Message)
- func (m *MatchString) XXX_Size() int
- func (m *MatchString) XXX_Unmarshal(b []byte) error
- type MatchString_MatchStringType
- type MatchString_ValueType
- type MetadataFailover
- func (*MetadataFailover) Descriptor() ([]byte, []int)
- func (m *MetadataFailover) GetFailoverRange() MetadataFailover_FailoverRange
- func (m *MetadataFailover) GetLabels() map[string]string
- func (*MetadataFailover) ProtoMessage()
- func (m *MetadataFailover) Reset()
- func (m *MetadataFailover) String() string
- func (m *MetadataFailover) XXX_DiscardUnknown()
- func (m *MetadataFailover) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *MetadataFailover) XXX_Merge(src proto.Message)
- func (m *MetadataFailover) XXX_Size() int
- func (m *MetadataFailover) XXX_Unmarshal(b []byte) error
- type MetadataFailover_FailoverRange
- type MetadataRoutingConfig
- func (*MetadataRoutingConfig) Descriptor() ([]byte, []int)
- func (m *MetadataRoutingConfig) GetFailover() *MetadataFailover
- func (m *MetadataRoutingConfig) GetLabels() map[string]string
- func (m *MetadataRoutingConfig) GetNamespace() string
- func (m *MetadataRoutingConfig) GetService() string
- func (*MetadataRoutingConfig) ProtoMessage()
- func (m *MetadataRoutingConfig) Reset()
- func (m *MetadataRoutingConfig) String() string
- func (m *MetadataRoutingConfig) XXX_DiscardUnknown()
- func (m *MetadataRoutingConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *MetadataRoutingConfig) XXX_Merge(src proto.Message)
- func (m *MetadataRoutingConfig) XXX_Size() int
- func (m *MetadataRoutingConfig) XXX_Unmarshal(b []byte) error
- type PolarisGRPCClient
- type PolarisGRPCServer
- type PolarisGRPC_DiscoverClient
- type PolarisGRPC_DiscoverServer
- type Response
- func (*Response) Descriptor() ([]byte, []int)
- func (m *Response) GetCode() uint32
- func (m *Response) GetData() *any.Any
- func (m *Response) GetInfo() string
- func (*Response) ProtoMessage()
- func (m *Response) Reset()
- func (m *Response) String() string
- func (m *Response) XXX_DiscardUnknown()
- func (m *Response) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *Response) XXX_Merge(src proto.Message)
- func (m *Response) XXX_Size() int
- func (m *Response) XXX_Unmarshal(b []byte) error
- type ResponseMessage
- type Routing
- func (*Routing) Descriptor() ([]byte, []int)
- func (m *Routing) GetCtime() string
- func (m *Routing) GetDescription() string
- func (m *Routing) GetEnable() bool
- func (m *Routing) GetEtime() string
- func (m *Routing) GetExtendInfo() map[string]string
- func (m *Routing) GetId() string
- func (m *Routing) GetMtime() string
- func (m *Routing) GetName() string
- func (m *Routing) GetNamespace() string
- func (m *Routing) GetPriority() uint32
- func (m *Routing) GetRevision() string
- func (m *Routing) GetRoutingConfig() *any.Any
- func (m *Routing) GetRoutingPolicy() RoutingPolicy
- func (*Routing) ProtoMessage()
- func (m *Routing) Reset()
- func (m *Routing) String() string
- func (m *Routing) XXX_DiscardUnknown()
- func (m *Routing) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *Routing) XXX_Merge(src proto.Message)
- func (m *Routing) XXX_Size() int
- func (m *Routing) XXX_Unmarshal(b []byte) error
- type RoutingPolicy
- type RuleRoutingConfig
- func (*RuleRoutingConfig) Descriptor() ([]byte, []int)
- func (m *RuleRoutingConfig) GetDestinations() []*Destination
- func (m *RuleRoutingConfig) GetSources() []*Source
- func (*RuleRoutingConfig) ProtoMessage()
- func (m *RuleRoutingConfig) Reset()
- func (m *RuleRoutingConfig) String() string
- func (m *RuleRoutingConfig) XXX_DiscardUnknown()
- func (m *RuleRoutingConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *RuleRoutingConfig) XXX_Merge(src proto.Message)
- func (m *RuleRoutingConfig) XXX_Size() int
- func (m *RuleRoutingConfig) XXX_Unmarshal(b []byte) error
- type Service
- func (*Service) Descriptor() ([]byte, []int)
- func (m *Service) GetName() string
- func (m *Service) GetNamespace() string
- func (m *Service) GetRevision() string
- func (*Service) ProtoMessage()
- func (m *Service) Reset()
- func (m *Service) String() string
- func (m *Service) XXX_DiscardUnknown()
- func (m *Service) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *Service) XXX_Merge(src proto.Message)
- func (m *Service) XXX_Size() int
- func (m *Service) XXX_Unmarshal(b []byte) error
- type SimpleResponse
- func (*SimpleResponse) Descriptor() ([]byte, []int)
- func (m *SimpleResponse) GetCode() uint32
- func (m *SimpleResponse) GetInfo() string
- func (*SimpleResponse) ProtoMessage()
- func (m *SimpleResponse) Reset()
- func (m *SimpleResponse) String() string
- func (m *SimpleResponse) XXX_DiscardUnknown()
- func (m *SimpleResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *SimpleResponse) XXX_Merge(src proto.Message)
- func (m *SimpleResponse) XXX_Size() int
- func (m *SimpleResponse) XXX_Unmarshal(b []byte) error
- type Source
- func (*Source) Descriptor() ([]byte, []int)
- func (m *Source) GetArguments() []*SourceMatch
- func (m *Source) GetNamespace() string
- func (m *Source) GetService() string
- func (*Source) ProtoMessage()
- func (m *Source) Reset()
- func (m *Source) String() string
- func (m *Source) XXX_DiscardUnknown()
- func (m *Source) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *Source) XXX_Merge(src proto.Message)
- func (m *Source) XXX_Size() int
- func (m *Source) XXX_Unmarshal(b []byte) error
- type SourceMatch
- func (*SourceMatch) Descriptor() ([]byte, []int)
- func (m *SourceMatch) GetKey() string
- func (m *SourceMatch) GetType() SourceMatch_Type
- func (m *SourceMatch) GetValue() *MatchString
- func (*SourceMatch) ProtoMessage()
- func (m *SourceMatch) Reset()
- func (m *SourceMatch) String() string
- func (m *SourceMatch) XXX_DiscardUnknown()
- func (m *SourceMatch) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *SourceMatch) XXX_Merge(src proto.Message)
- func (m *SourceMatch) XXX_Size() int
- func (m *SourceMatch) XXX_Unmarshal(b []byte) error
- type SourceMatch_Type
- type StaineLabel
- func (*StaineLabel) Descriptor() ([]byte, []int)
- func (m *StaineLabel) GetKey() string
- func (m *StaineLabel) GetValue() string
- func (*StaineLabel) ProtoMessage()
- func (m *StaineLabel) Reset()
- func (m *StaineLabel) String() string
- func (m *StaineLabel) XXX_DiscardUnknown()
- func (m *StaineLabel) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *StaineLabel) XXX_Merge(src proto.Message)
- func (m *StaineLabel) XXX_Size() int
- func (m *StaineLabel) XXX_Unmarshal(b []byte) error
- type StaineRule
- func (*StaineRule) Descriptor() ([]byte, []int)
- func (m *StaineRule) GetArguments() []*SourceMatch
- func (m *StaineRule) GetEnable() bool
- func (m *StaineRule) GetLabels() []*StaineLabel
- func (m *StaineRule) GetPriority() uint32
- func (m *StaineRule) GetStainePercent() uint32
- func (*StaineRule) ProtoMessage()
- func (m *StaineRule) Reset()
- func (m *StaineRule) String() string
- func (m *StaineRule) XXX_DiscardUnknown()
- func (m *StaineRule) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *StaineRule) XXX_Merge(src proto.Message)
- func (m *StaineRule) XXX_Size() int
- func (m *StaineRule) XXX_Unmarshal(b []byte) error
Constants ¶
This section is empty.
Variables ¶
View Source
var DiscoverRequest_DiscoverRequestType_name = map[int32]string{
0: "UNKNOWN",
1: "ROUTING",
2: "CIRCUIT_BREAKER",
}
View Source
var DiscoverRequest_DiscoverRequestType_value = map[string]int32{
"UNKNOWN": 0,
"ROUTING": 1,
"CIRCUIT_BREAKER": 2,
}
View Source
var DiscoverResponse_DiscoverResponseType_name = map[int32]string{
0: "UNKNOWN",
1: "INSTANCE",
2: "CLUSTER",
3: "ROUTING",
4: "RATE_LIMIT",
5: "CIRCUIT_BREAKER",
6: "SERVICES",
12: "NAMESPACES",
}
View Source
var DiscoverResponse_DiscoverResponseType_value = map[string]int32{
"UNKNOWN": 0,
"INSTANCE": 1,
"CLUSTER": 2,
"ROUTING": 3,
"RATE_LIMIT": 4,
"CIRCUIT_BREAKER": 5,
"SERVICES": 6,
"NAMESPACES": 12,
}
View Source
var MatchString_MatchStringType_name = map[int32]string{
0: "EXACT",
1: "REGEX",
2: "NOT_EQUALS",
3: "IN",
4: "NOT_IN",
}
View Source
var MatchString_MatchStringType_value = map[string]int32{
"EXACT": 0,
"REGEX": 1,
"NOT_EQUALS": 2,
"IN": 3,
"NOT_IN": 4,
}
View Source
var MatchString_ValueType_name = map[int32]string{
0: "TEXT",
1: "PARAMETER",
2: "VARIABLE",
}
View Source
var MatchString_ValueType_value = map[string]int32{
"TEXT": 0,
"PARAMETER": 1,
"VARIABLE": 2,
}
View Source
var MetadataFailover_FailoverRange_name = map[int32]string{
0: "ALL",
1: "OTHERS",
2: "OTHER_KEYS",
}
View Source
var MetadataFailover_FailoverRange_value = map[string]int32{
"ALL": 0,
"OTHERS": 1,
"OTHER_KEYS": 2,
}
View Source
var RoutingPolicy_name = map[int32]string{
0: "RulePolicy",
1: "MetadataPolicy",
}
View Source
var RoutingPolicy_value = map[string]int32{
"RulePolicy": 0,
"MetadataPolicy": 1,
}
View Source
var SourceMatch_Type_name = map[int32]string{
0: "CUSTOM",
1: "METHOD",
2: "HEADER",
3: "QUERY",
4: "CALLER_IP",
5: "PATH",
6: "COOKIE",
}
View Source
var SourceMatch_Type_value = map[string]int32{
"CUSTOM": 0,
"METHOD": 1,
"HEADER": 2,
"QUERY": 3,
"CALLER_IP": 4,
"PATH": 5,
"COOKIE": 6,
}
Functions ¶
func RegisterPolarisGRPCServer ¶
func RegisterPolarisGRPCServer(s *grpc.Server, srv PolarisGRPCServer)
Types ¶
type BatchQueryResponse ¶
type BatchQueryResponse struct { Code uint32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` Info string `protobuf:"bytes,2,opt,name=info,proto3" json:"info,omitempty"` Amount uint32 `protobuf:"varint,3,opt,name=amount,proto3" json:"amount,omitempty"` Size uint32 `protobuf:"varint,4,opt,name=size,proto3" json:"size,omitempty"` Data []*any.Any `protobuf:"bytes,5,rep,name=data,proto3" json:"data,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func NewBatchQueryResponse ¶
func NewBatchQueryResponse(code uint32) *BatchQueryResponse
*
- @brief 创建批量查询回复
func NewBatchQueryResponseWithMsg ¶
func NewBatchQueryResponseWithMsg(code uint32, msg string) *BatchQueryResponse
*
- @brief 创建带详细信息的批量查询回复
func (*BatchQueryResponse) Descriptor ¶
func (*BatchQueryResponse) Descriptor() ([]byte, []int)
func (*BatchQueryResponse) GetAmount ¶
func (m *BatchQueryResponse) GetAmount() uint32
func (*BatchQueryResponse) GetCode ¶
func (m *BatchQueryResponse) GetCode() uint32
func (*BatchQueryResponse) GetData ¶
func (m *BatchQueryResponse) GetData() []*any.Any
func (*BatchQueryResponse) GetInfo ¶
func (m *BatchQueryResponse) GetInfo() string
func (*BatchQueryResponse) GetSize ¶
func (m *BatchQueryResponse) GetSize() uint32
func (*BatchQueryResponse) ProtoMessage ¶
func (*BatchQueryResponse) ProtoMessage()
func (*BatchQueryResponse) Reset ¶
func (m *BatchQueryResponse) Reset()
func (*BatchQueryResponse) String ¶
func (m *BatchQueryResponse) String() string
func (*BatchQueryResponse) XXX_DiscardUnknown ¶
func (m *BatchQueryResponse) XXX_DiscardUnknown()
func (*BatchQueryResponse) XXX_Marshal ¶
func (m *BatchQueryResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*BatchQueryResponse) XXX_Merge ¶
func (dst *BatchQueryResponse) XXX_Merge(src proto.Message)
func (*BatchQueryResponse) XXX_Size ¶
func (m *BatchQueryResponse) XXX_Size() int
func (*BatchQueryResponse) XXX_Unmarshal ¶
func (m *BatchQueryResponse) XXX_Unmarshal(b []byte) error
type BatchWriteResponse ¶
type BatchWriteResponse struct { Code uint32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` Info string `protobuf:"bytes,2,opt,name=info,proto3" json:"info,omitempty"` Size uint32 `protobuf:"varint,3,opt,name=size,proto3" json:"size,omitempty"` Responses []*Response `protobuf:"bytes,4,rep,name=responses,proto3" json:"responses,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func FormatBatchWriteResponse ¶
func FormatBatchWriteResponse(response *BatchWriteResponse) *BatchWriteResponse
格式化responses batch操作 如果所有子错误码一致,那么使用子错误码 如果包含任意一个5xx,那么返回500
func NewBatchWriteResponse ¶
func NewBatchWriteResponse(code uint32) *BatchWriteResponse
*
- @brief 创建批量回复
func NewBatchWriteResponseWithMsg ¶
func NewBatchWriteResponseWithMsg(code uint32, msg string) *BatchWriteResponse
*
- @brief 创建带详细信息的批量回复
func (*BatchWriteResponse) Collect ¶
func (b *BatchWriteResponse) Collect(response *Response)
*
- @brief BatchWriteResponse添加Response
func (*BatchWriteResponse) CollectBatch ¶
func (b *BatchWriteResponse) CollectBatch(response []*Response)
*
- @brief BatchWriteResponse添加Response
func (*BatchWriteResponse) Descriptor ¶
func (*BatchWriteResponse) Descriptor() ([]byte, []int)
func (*BatchWriteResponse) GetCode ¶
func (m *BatchWriteResponse) GetCode() uint32
func (*BatchWriteResponse) GetInfo ¶
func (m *BatchWriteResponse) GetInfo() string
func (*BatchWriteResponse) GetResponses ¶
func (m *BatchWriteResponse) GetResponses() []*Response
func (*BatchWriteResponse) GetSize ¶
func (m *BatchWriteResponse) GetSize() uint32
func (*BatchWriteResponse) ProtoMessage ¶
func (*BatchWriteResponse) ProtoMessage()
func (*BatchWriteResponse) Reset ¶
func (m *BatchWriteResponse) Reset()
func (*BatchWriteResponse) String ¶
func (m *BatchWriteResponse) String() string
func (*BatchWriteResponse) XXX_DiscardUnknown ¶
func (m *BatchWriteResponse) XXX_DiscardUnknown()
func (*BatchWriteResponse) XXX_Marshal ¶
func (m *BatchWriteResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*BatchWriteResponse) XXX_Merge ¶
func (dst *BatchWriteResponse) XXX_Merge(src proto.Message)
func (*BatchWriteResponse) XXX_Size ¶
func (m *BatchWriteResponse) XXX_Size() int
func (*BatchWriteResponse) XXX_Unmarshal ¶
func (m *BatchWriteResponse) XXX_Unmarshal(b []byte) error
type Destination ¶
type Destination struct { // Templated service and namespace Service string `protobuf:"bytes,1,opt,name=service,proto3" json:"service,omitempty"` Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"` // Templated service example label // Value supports regular matching Labels map[string]*MatchString `` /* 153-byte string literal not displayed */ // According to the service name and service instance Metadata Filter the // qualified service instance subset Service instance subset can set priority // and weight Priority: integer, range [0, 9], the highest priority is 0 // Weight: Integer // Press priority routing, if there is high priority, low priority will not // use If there is a subset of the same priority, then assign by weight // Priority and weight can be not set / set up one / set two // If the section is set priority, some are not set, it is considered that the // priority is not set. If the part is set, some is not set, it is considered // that the weight is not set to 0 If you have no weight, you think the weight // is the same Priority uint32 `protobuf:"varint,4,opt,name=priority,proto3" json:"priority,omitempty"` Weight uint32 `protobuf:"varint,5,opt,name=weight,proto3" json:"weight,omitempty"` // Forward requests to proxy service Transfer string `protobuf:"bytes,6,opt,name=transfer,proto3" json:"transfer,omitempty"` // Whether to isolate the SET, after isolation, no traffic will be allocated Isolate bool `protobuf:"varint,7,opt,name=isolate,proto3" json:"isolate,omitempty"` // name desition name Name string `protobuf:"bytes,8,opt,name=name,proto3" json:"name,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Destination) Descriptor ¶
func (*Destination) Descriptor() ([]byte, []int)
func (*Destination) GetIsolate ¶
func (m *Destination) GetIsolate() bool
func (*Destination) GetLabels ¶
func (m *Destination) GetLabels() map[string]*MatchString
func (*Destination) GetName ¶
func (m *Destination) GetName() string
func (*Destination) GetNamespace ¶
func (m *Destination) GetNamespace() string
func (*Destination) GetPriority ¶
func (m *Destination) GetPriority() uint32
func (*Destination) GetService ¶
func (m *Destination) GetService() string
func (*Destination) GetTransfer ¶
func (m *Destination) GetTransfer() string
func (*Destination) GetWeight ¶
func (m *Destination) GetWeight() uint32
func (*Destination) ProtoMessage ¶
func (*Destination) ProtoMessage()
func (*Destination) Reset ¶
func (m *Destination) Reset()
func (*Destination) String ¶
func (m *Destination) String() string
func (*Destination) XXX_DiscardUnknown ¶
func (m *Destination) XXX_DiscardUnknown()
func (*Destination) XXX_Marshal ¶
func (m *Destination) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*Destination) XXX_Merge ¶
func (dst *Destination) XXX_Merge(src proto.Message)
func (*Destination) XXX_Size ¶
func (m *Destination) XXX_Size() int
func (*Destination) XXX_Unmarshal ¶
func (m *Destination) XXX_Unmarshal(b []byte) error
type DiscoverRequest ¶
type DiscoverRequest struct { Type DiscoverRequest_DiscoverRequestType `protobuf:"varint,1,opt,name=type,proto3,enum=v2.DiscoverRequest_DiscoverRequestType" json:"type,omitempty"` Serivce *Service `protobuf:"bytes,2,opt,name=serivce,proto3" json:"serivce,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*DiscoverRequest) Descriptor ¶
func (*DiscoverRequest) Descriptor() ([]byte, []int)
func (*DiscoverRequest) GetSerivce ¶
func (m *DiscoverRequest) GetSerivce() *Service
func (*DiscoverRequest) GetType ¶
func (m *DiscoverRequest) GetType() DiscoverRequest_DiscoverRequestType
func (*DiscoverRequest) ProtoMessage ¶
func (*DiscoverRequest) ProtoMessage()
func (*DiscoverRequest) Reset ¶
func (m *DiscoverRequest) Reset()
func (*DiscoverRequest) String ¶
func (m *DiscoverRequest) String() string
func (*DiscoverRequest) XXX_DiscardUnknown ¶
func (m *DiscoverRequest) XXX_DiscardUnknown()
func (*DiscoverRequest) XXX_Marshal ¶
func (m *DiscoverRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*DiscoverRequest) XXX_Merge ¶
func (dst *DiscoverRequest) XXX_Merge(src proto.Message)
func (*DiscoverRequest) XXX_Size ¶
func (m *DiscoverRequest) XXX_Size() int
func (*DiscoverRequest) XXX_Unmarshal ¶
func (m *DiscoverRequest) XXX_Unmarshal(b []byte) error
type DiscoverRequest_DiscoverRequestType ¶
type DiscoverRequest_DiscoverRequestType int32
const ( DiscoverRequest_UNKNOWN DiscoverRequest_DiscoverRequestType = 0 DiscoverRequest_ROUTING DiscoverRequest_DiscoverRequestType = 1 DiscoverRequest_CIRCUIT_BREAKER DiscoverRequest_DiscoverRequestType = 2 )
func (DiscoverRequest_DiscoverRequestType) EnumDescriptor ¶
func (DiscoverRequest_DiscoverRequestType) EnumDescriptor() ([]byte, []int)
func (DiscoverRequest_DiscoverRequestType) String ¶
func (x DiscoverRequest_DiscoverRequestType) String() string
type DiscoverResponse ¶
type DiscoverResponse struct { Code uint32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` Info string `protobuf:"bytes,2,opt,name=info,proto3" json:"info,omitempty"` Type DiscoverResponse_DiscoverResponseType `protobuf:"varint,3,opt,name=type,proto3,enum=v2.DiscoverResponse_DiscoverResponseType" json:"type,omitempty"` Service *Service `protobuf:"bytes,4,opt,name=service,proto3" json:"service,omitempty"` Routings []*Routing `protobuf:"bytes,6,rep,name=routings,proto3" json:"routings,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func NewDiscoverResponse ¶
func NewDiscoverResponse(code uint32) *DiscoverResponse
创建一个空白的discoverResponse
func NewDiscoverRoutingResponse ¶
func NewDiscoverRoutingResponse(code uint32, service *Service) *DiscoverResponse
*
- @brief 创建查询服务路由回复
func (*DiscoverResponse) Descriptor ¶
func (*DiscoverResponse) Descriptor() ([]byte, []int)
func (*DiscoverResponse) GetCode ¶
func (m *DiscoverResponse) GetCode() uint32
func (*DiscoverResponse) GetInfo ¶
func (m *DiscoverResponse) GetInfo() string
func (*DiscoverResponse) GetRoutings ¶
func (m *DiscoverResponse) GetRoutings() []*Routing
func (*DiscoverResponse) GetService ¶
func (m *DiscoverResponse) GetService() *Service
func (*DiscoverResponse) GetType ¶
func (m *DiscoverResponse) GetType() DiscoverResponse_DiscoverResponseType
func (*DiscoverResponse) ProtoMessage ¶
func (*DiscoverResponse) ProtoMessage()
func (*DiscoverResponse) Reset ¶
func (m *DiscoverResponse) Reset()
func (*DiscoverResponse) String ¶
func (m *DiscoverResponse) String() string
func (*DiscoverResponse) XXX_DiscardUnknown ¶
func (m *DiscoverResponse) XXX_DiscardUnknown()
func (*DiscoverResponse) XXX_Marshal ¶
func (m *DiscoverResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*DiscoverResponse) XXX_Merge ¶
func (dst *DiscoverResponse) XXX_Merge(src proto.Message)
func (*DiscoverResponse) XXX_Size ¶
func (m *DiscoverResponse) XXX_Size() int
func (*DiscoverResponse) XXX_Unmarshal ¶
func (m *DiscoverResponse) XXX_Unmarshal(b []byte) error
type DiscoverResponse_DiscoverResponseType ¶
type DiscoverResponse_DiscoverResponseType int32
const ( DiscoverResponse_UNKNOWN DiscoverResponse_DiscoverResponseType = 0 DiscoverResponse_INSTANCE DiscoverResponse_DiscoverResponseType = 1 DiscoverResponse_CLUSTER DiscoverResponse_DiscoverResponseType = 2 DiscoverResponse_ROUTING DiscoverResponse_DiscoverResponseType = 3 DiscoverResponse_RATE_LIMIT DiscoverResponse_DiscoverResponseType = 4 DiscoverResponse_CIRCUIT_BREAKER DiscoverResponse_DiscoverResponseType = 5 DiscoverResponse_SERVICES DiscoverResponse_DiscoverResponseType = 6 DiscoverResponse_NAMESPACES DiscoverResponse_DiscoverResponseType = 12 )
func (DiscoverResponse_DiscoverResponseType) EnumDescriptor ¶
func (DiscoverResponse_DiscoverResponseType) EnumDescriptor() ([]byte, []int)
func (DiscoverResponse_DiscoverResponseType) String ¶
func (x DiscoverResponse_DiscoverResponseType) String() string
type FlowStaining ¶
type FlowStaining struct { Id string `protobuf:"bytes,10,opt,name=id,proto3" json:"id,omitempty"` // flow statining rule name Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` // rules staining rules Rules []*StaineRule `protobuf:"bytes,3,rep,name=rules,proto3" json:"rules,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
FlowStaining 流量染色
func (*FlowStaining) Descriptor ¶
func (*FlowStaining) Descriptor() ([]byte, []int)
func (*FlowStaining) GetId ¶
func (m *FlowStaining) GetId() string
func (*FlowStaining) GetName ¶
func (m *FlowStaining) GetName() string
func (*FlowStaining) GetRules ¶
func (m *FlowStaining) GetRules() []*StaineRule
func (*FlowStaining) ProtoMessage ¶
func (*FlowStaining) ProtoMessage()
func (*FlowStaining) Reset ¶
func (m *FlowStaining) Reset()
func (*FlowStaining) String ¶
func (m *FlowStaining) String() string
func (*FlowStaining) XXX_DiscardUnknown ¶
func (m *FlowStaining) XXX_DiscardUnknown()
func (*FlowStaining) XXX_Marshal ¶
func (m *FlowStaining) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*FlowStaining) XXX_Merge ¶
func (dst *FlowStaining) XXX_Merge(src proto.Message)
func (*FlowStaining) XXX_Size ¶
func (m *FlowStaining) XXX_Size() int
func (*FlowStaining) XXX_Unmarshal ¶
func (m *FlowStaining) XXX_Unmarshal(b []byte) error
type MatchString ¶
type MatchString struct { Type MatchString_MatchStringType `protobuf:"varint,1,opt,name=type,proto3,enum=v2.MatchString_MatchStringType" json:"type,omitempty"` Value *wrappers.StringValue `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` ValueType MatchString_ValueType `protobuf:"varint,3,opt,name=value_type,json=valueType,proto3,enum=v2.MatchString_ValueType" json:"value_type,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
MatchString 这里的序号需要保证和 v1.MatchSrting 保持一致
func (*MatchString) Descriptor ¶
func (*MatchString) Descriptor() ([]byte, []int)
func (*MatchString) GetType ¶
func (m *MatchString) GetType() MatchString_MatchStringType
func (*MatchString) GetValue ¶
func (m *MatchString) GetValue() *wrappers.StringValue
func (*MatchString) GetValueType ¶
func (m *MatchString) GetValueType() MatchString_ValueType
func (*MatchString) ProtoMessage ¶
func (*MatchString) ProtoMessage()
func (*MatchString) Reset ¶
func (m *MatchString) Reset()
func (*MatchString) String ¶
func (m *MatchString) String() string
func (*MatchString) XXX_DiscardUnknown ¶
func (m *MatchString) XXX_DiscardUnknown()
func (*MatchString) XXX_Marshal ¶
func (m *MatchString) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MatchString) XXX_Merge ¶
func (dst *MatchString) XXX_Merge(src proto.Message)
func (*MatchString) XXX_Size ¶
func (m *MatchString) XXX_Size() int
func (*MatchString) XXX_Unmarshal ¶
func (m *MatchString) XXX_Unmarshal(b []byte) error
type MatchString_MatchStringType ¶
type MatchString_MatchStringType int32
const ( // Equivalent match MatchString_EXACT MatchString_MatchStringType = 0 // Regular match MatchString_REGEX MatchString_MatchStringType = 1 // Not equals match MatchString_NOT_EQUALS MatchString_MatchStringType = 2 // Include match MatchString_IN MatchString_MatchStringType = 3 // Not include match MatchString_NOT_IN MatchString_MatchStringType = 4 )
func (MatchString_MatchStringType) EnumDescriptor ¶
func (MatchString_MatchStringType) EnumDescriptor() ([]byte, []int)
func (MatchString_MatchStringType) String ¶
func (x MatchString_MatchStringType) String() string
type MatchString_ValueType ¶
type MatchString_ValueType int32
const ( MatchString_TEXT MatchString_ValueType = 0 MatchString_PARAMETER MatchString_ValueType = 1 MatchString_VARIABLE MatchString_ValueType = 2 )
func (MatchString_ValueType) EnumDescriptor ¶
func (MatchString_ValueType) EnumDescriptor() ([]byte, []int)
func (MatchString_ValueType) String ¶
func (x MatchString_ValueType) String() string
type MetadataFailover ¶
type MetadataFailover struct { // failover_range metadata route bottom type FailoverRange MetadataFailover_FailoverRange `` /* 140-byte string literal not displayed */ // only use to failover_range == OTHER_KEYS Labels map[string]string `` /* 153-byte string literal not displayed */ XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*MetadataFailover) Descriptor ¶
func (*MetadataFailover) Descriptor() ([]byte, []int)
func (*MetadataFailover) GetFailoverRange ¶
func (m *MetadataFailover) GetFailoverRange() MetadataFailover_FailoverRange
func (*MetadataFailover) GetLabels ¶
func (m *MetadataFailover) GetLabels() map[string]string
func (*MetadataFailover) ProtoMessage ¶
func (*MetadataFailover) ProtoMessage()
func (*MetadataFailover) Reset ¶
func (m *MetadataFailover) Reset()
func (*MetadataFailover) String ¶
func (m *MetadataFailover) String() string
func (*MetadataFailover) XXX_DiscardUnknown ¶
func (m *MetadataFailover) XXX_DiscardUnknown()
func (*MetadataFailover) XXX_Marshal ¶
func (m *MetadataFailover) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MetadataFailover) XXX_Merge ¶
func (dst *MetadataFailover) XXX_Merge(src proto.Message)
func (*MetadataFailover) XXX_Size ¶
func (m *MetadataFailover) XXX_Size() int
func (*MetadataFailover) XXX_Unmarshal ¶
func (m *MetadataFailover) XXX_Unmarshal(b []byte) error
type MetadataFailover_FailoverRange ¶
type MetadataFailover_FailoverRange int32
const ( // ALL return all instances MetadataFailover_ALL MetadataFailover_FailoverRange = 0 // OTHERS retuen without thie labels instances MetadataFailover_OTHERS MetadataFailover_FailoverRange = 1 // OTHER_KEYS return other instances which match keys MetadataFailover_OTHER_KEYS MetadataFailover_FailoverRange = 2 )
func (MetadataFailover_FailoverRange) EnumDescriptor ¶
func (MetadataFailover_FailoverRange) EnumDescriptor() ([]byte, []int)
func (MetadataFailover_FailoverRange) String ¶
func (x MetadataFailover_FailoverRange) String() string
type MetadataRoutingConfig ¶
type MetadataRoutingConfig struct { // service Service string `protobuf:"bytes,1,opt,name=service,proto3" json:"service,omitempty"` // namespace Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"` Labels map[string]string `` /* 153-byte string literal not displayed */ // When metadata not found, it will fall back to the Failover *MetadataFailover `protobuf:"bytes,4,opt,name=failover,proto3" json:"failover,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
MetadataRoutingConfig metadata routing configuration
func (*MetadataRoutingConfig) Descriptor ¶
func (*MetadataRoutingConfig) Descriptor() ([]byte, []int)
func (*MetadataRoutingConfig) GetFailover ¶
func (m *MetadataRoutingConfig) GetFailover() *MetadataFailover
func (*MetadataRoutingConfig) GetLabels ¶
func (m *MetadataRoutingConfig) GetLabels() map[string]string
func (*MetadataRoutingConfig) GetNamespace ¶
func (m *MetadataRoutingConfig) GetNamespace() string
func (*MetadataRoutingConfig) GetService ¶
func (m *MetadataRoutingConfig) GetService() string
func (*MetadataRoutingConfig) ProtoMessage ¶
func (*MetadataRoutingConfig) ProtoMessage()
func (*MetadataRoutingConfig) Reset ¶
func (m *MetadataRoutingConfig) Reset()
func (*MetadataRoutingConfig) String ¶
func (m *MetadataRoutingConfig) String() string
func (*MetadataRoutingConfig) XXX_DiscardUnknown ¶
func (m *MetadataRoutingConfig) XXX_DiscardUnknown()
func (*MetadataRoutingConfig) XXX_Marshal ¶
func (m *MetadataRoutingConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MetadataRoutingConfig) XXX_Merge ¶
func (dst *MetadataRoutingConfig) XXX_Merge(src proto.Message)
func (*MetadataRoutingConfig) XXX_Size ¶
func (m *MetadataRoutingConfig) XXX_Size() int
func (*MetadataRoutingConfig) XXX_Unmarshal ¶
func (m *MetadataRoutingConfig) XXX_Unmarshal(b []byte) error
type PolarisGRPCClient ¶
type PolarisGRPCClient interface { // 统一发现接口 Discover(ctx context.Context, opts ...grpc.CallOption) (PolarisGRPC_DiscoverClient, error) }
PolarisGRPCClient is the client API for PolarisGRPC service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewPolarisGRPCClient ¶
func NewPolarisGRPCClient(cc *grpc.ClientConn) PolarisGRPCClient
type PolarisGRPCServer ¶
type PolarisGRPCServer interface { // 统一发现接口 Discover(PolarisGRPC_DiscoverServer) error }
PolarisGRPCServer is the server API for PolarisGRPC service.
type PolarisGRPC_DiscoverClient ¶
type PolarisGRPC_DiscoverClient interface { Send(*DiscoverRequest) error Recv() (*DiscoverResponse, error) grpc.ClientStream }
type PolarisGRPC_DiscoverServer ¶
type PolarisGRPC_DiscoverServer interface { Send(*DiscoverResponse) error Recv() (*DiscoverRequest, error) grpc.ServerStream }
type Response ¶
type Response struct { Code uint32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` Info string `protobuf:"bytes,2,opt,name=info,proto3" json:"info,omitempty"` Data *any.Any `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Response) Descriptor ¶
func (*Response) ProtoMessage ¶
func (*Response) ProtoMessage()
func (*Response) XXX_DiscardUnknown ¶
func (m *Response) XXX_DiscardUnknown()
func (*Response) XXX_Marshal ¶
func (*Response) XXX_Unmarshal ¶
type Routing ¶
type Routing struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // route rule name Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` // namespace namingspace of routing rules Namespace string `protobuf:"bytes,3,opt,name=namespace,proto3" json:"namespace,omitempty"` // Enable this router Enable bool `protobuf:"varint,4,opt,name=enable,proto3" json:"enable,omitempty"` // Router type RoutingPolicy RoutingPolicy `protobuf:"varint,5,opt,name=routing_policy,proto3,enum=v2.RoutingPolicy" json:"routing_policy,omitempty"` // Routing configuration for router RoutingConfig *any.Any `protobuf:"bytes,6,opt,name=routing_config,proto3" json:"routing_config,omitempty"` // revision routing version Revision string `protobuf:"bytes,7,opt,name=revision,proto3" json:"revision,omitempty"` // ctime create time of the rules Ctime string `protobuf:"bytes,8,opt,name=ctime,proto3" json:"ctime,omitempty"` // mtime modify time of the rules Mtime string `protobuf:"bytes,9,opt,name=mtime,proto3" json:"mtime,omitempty"` // etime enable time of the rules Etime string `protobuf:"bytes,10,opt,name=etime,proto3" json:"etime,omitempty"` // priority rules priority Priority uint32 `protobuf:"varint,11,opt,name=priority,proto3" json:"priority,omitempty"` // description simple description rules Description string `protobuf:"bytes,12,opt,name=description,proto3" json:"description,omitempty"` // extendInfo 用于承载一些额外信息 // case 1: 升级到 v2 版本时,记录对应到 v1 版本的 id 信息 ExtendInfo map[string]string `` /* 162-byte string literal not displayed */ XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
configuration root for route
func (*Routing) Descriptor ¶
func (*Routing) GetDescription ¶
func (*Routing) GetExtendInfo ¶
func (*Routing) GetNamespace ¶
func (*Routing) GetPriority ¶
func (*Routing) GetRevision ¶
func (*Routing) GetRoutingConfig ¶
func (*Routing) GetRoutingPolicy ¶
func (m *Routing) GetRoutingPolicy() RoutingPolicy
func (*Routing) ProtoMessage ¶
func (*Routing) ProtoMessage()
func (*Routing) XXX_DiscardUnknown ¶
func (m *Routing) XXX_DiscardUnknown()
func (*Routing) XXX_Marshal ¶
func (*Routing) XXX_Unmarshal ¶
type RoutingPolicy ¶
type RoutingPolicy int32
const ( // Route by rule rule => RuleRoutingConfig RoutingPolicy_RulePolicy RoutingPolicy = 0 // Route by destination metadata RoutingPolicy_MetadataPolicy RoutingPolicy = 1 )
func (RoutingPolicy) EnumDescriptor ¶
func (RoutingPolicy) EnumDescriptor() ([]byte, []int)
func (RoutingPolicy) String ¶
func (x RoutingPolicy) String() string
type RuleRoutingConfig ¶
type RuleRoutingConfig struct { // source source info Sources []*Source `protobuf:"bytes,1,rep,name=sources,proto3" json:"sources,omitempty"` // destination destinations info Destinations []*Destination `protobuf:"bytes,2,rep,name=destinations,proto3" json:"destinations,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
RuleRoutingConfig routing configuration
func (*RuleRoutingConfig) Descriptor ¶
func (*RuleRoutingConfig) Descriptor() ([]byte, []int)
func (*RuleRoutingConfig) GetDestinations ¶
func (m *RuleRoutingConfig) GetDestinations() []*Destination
func (*RuleRoutingConfig) GetSources ¶
func (m *RuleRoutingConfig) GetSources() []*Source
func (*RuleRoutingConfig) ProtoMessage ¶
func (*RuleRoutingConfig) ProtoMessage()
func (*RuleRoutingConfig) Reset ¶
func (m *RuleRoutingConfig) Reset()
func (*RuleRoutingConfig) String ¶
func (m *RuleRoutingConfig) String() string
func (*RuleRoutingConfig) XXX_DiscardUnknown ¶
func (m *RuleRoutingConfig) XXX_DiscardUnknown()
func (*RuleRoutingConfig) XXX_Marshal ¶
func (m *RuleRoutingConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*RuleRoutingConfig) XXX_Merge ¶
func (dst *RuleRoutingConfig) XXX_Merge(src proto.Message)
func (*RuleRoutingConfig) XXX_Size ¶
func (m *RuleRoutingConfig) XXX_Size() int
func (*RuleRoutingConfig) XXX_Unmarshal ¶
func (m *RuleRoutingConfig) XXX_Unmarshal(b []byte) error
type Service ¶
type Service struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"` Revision string `protobuf:"bytes,3,opt,name=revision,proto3" json:"revision,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Service) Descriptor ¶
func (*Service) GetNamespace ¶
func (*Service) GetRevision ¶
func (*Service) ProtoMessage ¶
func (*Service) ProtoMessage()
func (*Service) XXX_DiscardUnknown ¶
func (m *Service) XXX_DiscardUnknown()
func (*Service) XXX_Marshal ¶
func (*Service) XXX_Unmarshal ¶
type SimpleResponse ¶
type SimpleResponse struct { Code uint32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` Info string `protobuf:"bytes,2,opt,name=info,proto3" json:"info,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*SimpleResponse) Descriptor ¶
func (*SimpleResponse) Descriptor() ([]byte, []int)
func (*SimpleResponse) GetCode ¶
func (m *SimpleResponse) GetCode() uint32
func (*SimpleResponse) GetInfo ¶
func (m *SimpleResponse) GetInfo() string
func (*SimpleResponse) ProtoMessage ¶
func (*SimpleResponse) ProtoMessage()
func (*SimpleResponse) Reset ¶
func (m *SimpleResponse) Reset()
func (*SimpleResponse) String ¶
func (m *SimpleResponse) String() string
func (*SimpleResponse) XXX_DiscardUnknown ¶
func (m *SimpleResponse) XXX_DiscardUnknown()
func (*SimpleResponse) XXX_Marshal ¶
func (m *SimpleResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*SimpleResponse) XXX_Merge ¶
func (dst *SimpleResponse) XXX_Merge(src proto.Message)
func (*SimpleResponse) XXX_Size ¶
func (m *SimpleResponse) XXX_Size() int
func (*SimpleResponse) XXX_Unmarshal ¶
func (m *SimpleResponse) XXX_Unmarshal(b []byte) error
type Source ¶
type Source struct { // Main tuning service and namespace Service string `protobuf:"bytes,1,opt,name=service,proto3" json:"service,omitempty"` Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"` // Master Control Service Example Tag or Request Label // Value supports regular matching Arguments []*SourceMatch `protobuf:"bytes,3,rep,name=arguments,proto3" json:"arguments,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Source) Descriptor ¶
func (*Source) GetArguments ¶
func (m *Source) GetArguments() []*SourceMatch
func (*Source) GetNamespace ¶
func (*Source) GetService ¶
func (*Source) ProtoMessage ¶
func (*Source) ProtoMessage()
func (*Source) XXX_DiscardUnknown ¶
func (m *Source) XXX_DiscardUnknown()
func (*Source) XXX_Marshal ¶
func (*Source) XXX_Unmarshal ¶
type SourceMatch ¶
type SourceMatch struct { Type SourceMatch_Type `protobuf:"varint,1,opt,name=type,proto3,enum=v2.SourceMatch_Type" json:"type,omitempty"` // header key or query key Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` // header value or query value Value *MatchString `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
SourceMatch
func (*SourceMatch) Descriptor ¶
func (*SourceMatch) Descriptor() ([]byte, []int)
func (*SourceMatch) GetKey ¶
func (m *SourceMatch) GetKey() string
func (*SourceMatch) GetType ¶
func (m *SourceMatch) GetType() SourceMatch_Type
func (*SourceMatch) GetValue ¶
func (m *SourceMatch) GetValue() *MatchString
func (*SourceMatch) ProtoMessage ¶
func (*SourceMatch) ProtoMessage()
func (*SourceMatch) Reset ¶
func (m *SourceMatch) Reset()
func (*SourceMatch) String ¶
func (m *SourceMatch) String() string
func (*SourceMatch) XXX_DiscardUnknown ¶
func (m *SourceMatch) XXX_DiscardUnknown()
func (*SourceMatch) XXX_Marshal ¶
func (m *SourceMatch) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*SourceMatch) XXX_Merge ¶
func (dst *SourceMatch) XXX_Merge(src proto.Message)
func (*SourceMatch) XXX_Size ¶
func (m *SourceMatch) XXX_Size() int
func (*SourceMatch) XXX_Unmarshal ¶
func (m *SourceMatch) XXX_Unmarshal(b []byte) error
type SourceMatch_Type ¶
type SourceMatch_Type int32
label type for gateway request
const ( // custom arguments SourceMatch_CUSTOM SourceMatch_Type = 0 // method, match the http post/get/put/delete or grpc method SourceMatch_METHOD SourceMatch_Type = 1 // header, match the http header, dubbo attachment, grpc header SourceMatch_HEADER SourceMatch_Type = 2 // query, match the http query, dubbo argument SourceMatch_QUERY SourceMatch_Type = 3 // caller host ip SourceMatch_CALLER_IP SourceMatch_Type = 4 // path, math the http url SourceMatch_PATH SourceMatch_Type = 5 // cookie match http cookie SourceMatch_COOKIE SourceMatch_Type = 6 )
func (SourceMatch_Type) EnumDescriptor ¶
func (SourceMatch_Type) EnumDescriptor() ([]byte, []int)
func (SourceMatch_Type) String ¶
func (x SourceMatch_Type) String() string
type StaineLabel ¶
type StaineLabel struct { Key string `protobuf:"bytes,1,opt,name=Key,proto3" json:"Key,omitempty"` Value string `protobuf:"bytes,2,opt,name=Value,proto3" json:"Value,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*StaineLabel) Descriptor ¶
func (*StaineLabel) Descriptor() ([]byte, []int)
func (*StaineLabel) GetKey ¶
func (m *StaineLabel) GetKey() string
func (*StaineLabel) GetValue ¶
func (m *StaineLabel) GetValue() string
func (*StaineLabel) ProtoMessage ¶
func (*StaineLabel) ProtoMessage()
func (*StaineLabel) Reset ¶
func (m *StaineLabel) Reset()
func (*StaineLabel) String ¶
func (m *StaineLabel) String() string
func (*StaineLabel) XXX_DiscardUnknown ¶
func (m *StaineLabel) XXX_DiscardUnknown()
func (*StaineLabel) XXX_Marshal ¶
func (m *StaineLabel) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*StaineLabel) XXX_Merge ¶
func (dst *StaineLabel) XXX_Merge(src proto.Message)
func (*StaineLabel) XXX_Size ¶
func (m *StaineLabel) XXX_Size() int
func (*StaineLabel) XXX_Unmarshal ¶
func (m *StaineLabel) XXX_Unmarshal(b []byte) error
type StaineRule ¶
type StaineRule struct { // Traffic matching rules Arguments []*SourceMatch `protobuf:"bytes,1,rep,name=arguments,proto3" json:"arguments,omitempty"` // Staining label Labels []*StaineLabel `protobuf:"bytes,2,rep,name=labels,proto3" json:"labels,omitempty"` // Stain Label Priority uint32 `protobuf:"varint,3,opt,name=priority,proto3" json:"priority,omitempty"` // rule is enabled Enable bool `protobuf:"varint,4,opt,name=enable,proto3" json:"enable,omitempty"` // Set the percentage of traffic that needs to be dyed StainePercent uint32 `protobuf:"varint,5,opt,name=stainePercent,proto3" json:"stainePercent,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*StaineRule) Descriptor ¶
func (*StaineRule) Descriptor() ([]byte, []int)
func (*StaineRule) GetArguments ¶
func (m *StaineRule) GetArguments() []*SourceMatch
func (*StaineRule) GetEnable ¶
func (m *StaineRule) GetEnable() bool
func (*StaineRule) GetLabels ¶
func (m *StaineRule) GetLabels() []*StaineLabel
func (*StaineRule) GetPriority ¶
func (m *StaineRule) GetPriority() uint32
func (*StaineRule) GetStainePercent ¶
func (m *StaineRule) GetStainePercent() uint32
func (*StaineRule) ProtoMessage ¶
func (*StaineRule) ProtoMessage()
func (*StaineRule) Reset ¶
func (m *StaineRule) Reset()
func (*StaineRule) String ¶
func (m *StaineRule) String() string
func (*StaineRule) XXX_DiscardUnknown ¶
func (m *StaineRule) XXX_DiscardUnknown()
func (*StaineRule) XXX_Marshal ¶
func (m *StaineRule) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*StaineRule) XXX_Merge ¶
func (dst *StaineRule) XXX_Merge(src proto.Message)
func (*StaineRule) XXX_Size ¶
func (m *StaineRule) XXX_Size() int
func (*StaineRule) XXX_Unmarshal ¶
func (m *StaineRule) XXX_Unmarshal(b []byte) error
Click to show internal directories.
Click to hide internal directories.