Documentation ¶
Overview ¶
Package metapb is a generated protocol buffer package.
It is generated from these files:
metapb.proto
It has these top-level messages:
Proxy Cluster HeathCheck CircuitBreaker Server Bind PairValue IPAccessControl HTTPResult Parameter ValidationRule Validation DispatchNode Cache RenderTemplate RenderObject RenderAttr API Condition Routing
Index ¶
- Variables
- type API
- func (*API) Descriptor() ([]byte, []int)
- func (m *API) GetAuthFilter() string
- func (m *API) GetDefaultValue() *HTTPResult
- func (m *API) GetDomain() string
- func (m *API) GetID() uint64
- func (m *API) GetIPAccessControl() *IPAccessControl
- func (m *API) GetMethod() string
- func (m *API) GetName() string
- func (m *API) GetNodes() []*DispatchNode
- func (m *API) GetPerms() []string
- func (m *API) GetRenderTemplate() *RenderTemplate
- func (m *API) GetStatus() Status
- func (m *API) GetURLPattern() string
- func (m *API) GetUseDefault() bool
- func (m *API) Marshal() (dAtA []byte, err error)
- func (m *API) MarshalTo(dAtA []byte) (int, error)
- func (*API) ProtoMessage()
- func (m *API) Reset()
- func (m *API) Size() (n int)
- func (m *API) String() string
- func (m *API) Unmarshal(dAtA []byte) error
- type Bind
- func (*Bind) Descriptor() ([]byte, []int)
- func (m *Bind) GetClusterID() uint64
- func (m *Bind) GetServerID() uint64
- func (m *Bind) Marshal() (dAtA []byte, err error)
- func (m *Bind) MarshalTo(dAtA []byte) (int, error)
- func (*Bind) ProtoMessage()
- func (m *Bind) Reset()
- func (m *Bind) Size() (n int)
- func (m *Bind) String() string
- func (m *Bind) Unmarshal(dAtA []byte) error
- type CMP
- type Cache
- func (*Cache) Descriptor() ([]byte, []int)
- func (m *Cache) GetConditions() []Condition
- func (m *Cache) GetDeadline() uint64
- func (m *Cache) GetKeys() []Parameter
- func (m *Cache) Marshal() (dAtA []byte, err error)
- func (m *Cache) MarshalTo(dAtA []byte) (int, error)
- func (*Cache) ProtoMessage()
- func (m *Cache) Reset()
- func (m *Cache) Size() (n int)
- func (m *Cache) String() string
- func (m *Cache) Unmarshal(dAtA []byte) error
- type CircuitBreaker
- func (*CircuitBreaker) Descriptor() ([]byte, []int)
- func (m *CircuitBreaker) GetCloseTimeout() int64
- func (m *CircuitBreaker) GetFailureRateToClose() int32
- func (m *CircuitBreaker) GetHalfTrafficRate() int32
- func (m *CircuitBreaker) GetRateCheckPeriod() int64
- func (m *CircuitBreaker) GetSucceedRateToOpen() int32
- func (m *CircuitBreaker) Marshal() (dAtA []byte, err error)
- func (m *CircuitBreaker) MarshalTo(dAtA []byte) (int, error)
- func (*CircuitBreaker) ProtoMessage()
- func (m *CircuitBreaker) Reset()
- func (m *CircuitBreaker) Size() (n int)
- func (m *CircuitBreaker) String() string
- func (m *CircuitBreaker) Unmarshal(dAtA []byte) error
- type CircuitStatus
- type Cluster
- func (*Cluster) Descriptor() ([]byte, []int)
- func (m *Cluster) GetID() uint64
- func (m *Cluster) GetLoadBalance() LoadBalance
- func (m *Cluster) GetName() string
- func (m *Cluster) Marshal() (dAtA []byte, err error)
- func (m *Cluster) MarshalTo(dAtA []byte) (int, error)
- func (*Cluster) ProtoMessage()
- func (m *Cluster) Reset()
- func (m *Cluster) Size() (n int)
- func (m *Cluster) String() string
- func (m *Cluster) Unmarshal(dAtA []byte) error
- type Condition
- func (*Condition) Descriptor() ([]byte, []int)
- func (m *Condition) GetCmp() CMP
- func (m *Condition) GetExpect() string
- func (m *Condition) GetParameter() Parameter
- func (m *Condition) Marshal() (dAtA []byte, err error)
- func (m *Condition) MarshalTo(dAtA []byte) (int, error)
- func (*Condition) ProtoMessage()
- func (m *Condition) Reset()
- func (m *Condition) Size() (n int)
- func (m *Condition) String() string
- func (m *Condition) Unmarshal(dAtA []byte) error
- type DispatchNode
- func (*DispatchNode) Descriptor() ([]byte, []int)
- func (m *DispatchNode) GetAttrName() string
- func (m *DispatchNode) GetBatchIndex() int32
- func (m *DispatchNode) GetCache() *Cache
- func (m *DispatchNode) GetClusterID() uint64
- func (m *DispatchNode) GetDefaultValue() *HTTPResult
- func (m *DispatchNode) GetURLRewrite() string
- func (m *DispatchNode) GetUseDefault() bool
- func (m *DispatchNode) GetValidations() []*Validation
- func (m *DispatchNode) Marshal() (dAtA []byte, err error)
- func (m *DispatchNode) MarshalTo(dAtA []byte) (int, error)
- func (*DispatchNode) ProtoMessage()
- func (m *DispatchNode) Reset()
- func (m *DispatchNode) Size() (n int)
- func (m *DispatchNode) String() string
- func (m *DispatchNode) Unmarshal(dAtA []byte) error
- type HTTPResult
- func (*HTTPResult) Descriptor() ([]byte, []int)
- func (m *HTTPResult) GetBody() []byte
- func (m *HTTPResult) GetCookies() []*PairValue
- func (m *HTTPResult) GetHeaders() []*PairValue
- func (m *HTTPResult) Marshal() (dAtA []byte, err error)
- func (m *HTTPResult) MarshalTo(dAtA []byte) (int, error)
- func (*HTTPResult) ProtoMessage()
- func (m *HTTPResult) Reset()
- func (m *HTTPResult) Size() (n int)
- func (m *HTTPResult) String() string
- func (m *HTTPResult) Unmarshal(dAtA []byte) error
- type HeathCheck
- func (*HeathCheck) Descriptor() ([]byte, []int)
- func (m *HeathCheck) GetBody() string
- func (m *HeathCheck) GetCheckInterval() int64
- func (m *HeathCheck) GetPath() string
- func (m *HeathCheck) GetTimeout() int64
- func (m *HeathCheck) Marshal() (dAtA []byte, err error)
- func (m *HeathCheck) MarshalTo(dAtA []byte) (int, error)
- func (*HeathCheck) ProtoMessage()
- func (m *HeathCheck) Reset()
- func (m *HeathCheck) Size() (n int)
- func (m *HeathCheck) String() string
- func (m *HeathCheck) Unmarshal(dAtA []byte) error
- type IPAccessControl
- func (*IPAccessControl) Descriptor() ([]byte, []int)
- func (m *IPAccessControl) GetBlacklist() []string
- func (m *IPAccessControl) GetWhitelist() []string
- func (m *IPAccessControl) Marshal() (dAtA []byte, err error)
- func (m *IPAccessControl) MarshalTo(dAtA []byte) (int, error)
- func (*IPAccessControl) ProtoMessage()
- func (m *IPAccessControl) Reset()
- func (m *IPAccessControl) Size() (n int)
- func (m *IPAccessControl) String() string
- func (m *IPAccessControl) Unmarshal(dAtA []byte) error
- type LoadBalance
- type PairValue
- func (*PairValue) Descriptor() ([]byte, []int)
- func (m *PairValue) GetName() string
- func (m *PairValue) GetValue() string
- func (m *PairValue) Marshal() (dAtA []byte, err error)
- func (m *PairValue) MarshalTo(dAtA []byte) (int, error)
- func (*PairValue) ProtoMessage()
- func (m *PairValue) Reset()
- func (m *PairValue) Size() (n int)
- func (m *PairValue) String() string
- func (m *PairValue) Unmarshal(dAtA []byte) error
- type Parameter
- func (*Parameter) Descriptor() ([]byte, []int)
- func (m *Parameter) GetIndex() int32
- func (m *Parameter) GetName() string
- func (m *Parameter) GetSource() Source
- func (m *Parameter) Marshal() (dAtA []byte, err error)
- func (m *Parameter) MarshalTo(dAtA []byte) (int, error)
- func (*Parameter) ProtoMessage()
- func (m *Parameter) Reset()
- func (m *Parameter) Size() (n int)
- func (m *Parameter) String() string
- func (m *Parameter) Unmarshal(dAtA []byte) error
- type Protocol
- type Proxy
- func (*Proxy) Descriptor() ([]byte, []int)
- func (m *Proxy) GetAddr() string
- func (m *Proxy) GetAddrRPC() string
- func (m *Proxy) Marshal() (dAtA []byte, err error)
- func (m *Proxy) MarshalTo(dAtA []byte) (int, error)
- func (*Proxy) ProtoMessage()
- func (m *Proxy) Reset()
- func (m *Proxy) Size() (n int)
- func (m *Proxy) String() string
- func (m *Proxy) Unmarshal(dAtA []byte) error
- type RenderAttr
- func (*RenderAttr) Descriptor() ([]byte, []int)
- func (m *RenderAttr) GetExtractExp() string
- func (m *RenderAttr) GetName() string
- func (m *RenderAttr) Marshal() (dAtA []byte, err error)
- func (m *RenderAttr) MarshalTo(dAtA []byte) (int, error)
- func (*RenderAttr) ProtoMessage()
- func (m *RenderAttr) Reset()
- func (m *RenderAttr) Size() (n int)
- func (m *RenderAttr) String() string
- func (m *RenderAttr) Unmarshal(dAtA []byte) error
- type RenderObject
- func (*RenderObject) Descriptor() ([]byte, []int)
- func (m *RenderObject) GetAttrs() []*RenderAttr
- func (m *RenderObject) GetFlatAttrs() bool
- func (m *RenderObject) GetName() string
- func (m *RenderObject) Marshal() (dAtA []byte, err error)
- func (m *RenderObject) MarshalTo(dAtA []byte) (int, error)
- func (*RenderObject) ProtoMessage()
- func (m *RenderObject) Reset()
- func (m *RenderObject) Size() (n int)
- func (m *RenderObject) String() string
- func (m *RenderObject) Unmarshal(dAtA []byte) error
- type RenderTemplate
- func (*RenderTemplate) Descriptor() ([]byte, []int)
- func (m *RenderTemplate) GetObjects() []*RenderObject
- func (m *RenderTemplate) Marshal() (dAtA []byte, err error)
- func (m *RenderTemplate) MarshalTo(dAtA []byte) (int, error)
- func (*RenderTemplate) ProtoMessage()
- func (m *RenderTemplate) Reset()
- func (m *RenderTemplate) Size() (n int)
- func (m *RenderTemplate) String() string
- func (m *RenderTemplate) Unmarshal(dAtA []byte) error
- type Routing
- func (*Routing) Descriptor() ([]byte, []int)
- func (m *Routing) GetAPI() uint64
- func (m *Routing) GetClusterID() uint64
- func (m *Routing) GetConditions() []Condition
- func (m *Routing) GetID() uint64
- func (m *Routing) GetName() string
- func (m *Routing) GetStatus() Status
- func (m *Routing) GetStrategy() RoutingStrategy
- func (m *Routing) GetTrafficRate() int32
- func (m *Routing) Marshal() (dAtA []byte, err error)
- func (m *Routing) MarshalTo(dAtA []byte) (int, error)
- func (*Routing) ProtoMessage()
- func (m *Routing) Reset()
- func (m *Routing) Size() (n int)
- func (m *Routing) String() string
- func (m *Routing) Unmarshal(dAtA []byte) error
- type RoutingStrategy
- type RuleType
- type Server
- func (*Server) Descriptor() ([]byte, []int)
- func (m *Server) GetAddr() string
- func (m *Server) GetCircuitBreaker() *CircuitBreaker
- func (m *Server) GetHeathCheck() *HeathCheck
- func (m *Server) GetID() uint64
- func (m *Server) GetMaxQPS() int64
- func (m *Server) GetProtocol() Protocol
- func (m *Server) Marshal() (dAtA []byte, err error)
- func (m *Server) MarshalTo(dAtA []byte) (int, error)
- func (*Server) ProtoMessage()
- func (m *Server) Reset()
- func (m *Server) Size() (n int)
- func (m *Server) String() string
- func (m *Server) Unmarshal(dAtA []byte) error
- type Source
- type Status
- type Validation
- func (*Validation) Descriptor() ([]byte, []int)
- func (m *Validation) GetParameter() Parameter
- func (m *Validation) GetRequired() bool
- func (m *Validation) GetRules() []ValidationRule
- func (m *Validation) Marshal() (dAtA []byte, err error)
- func (m *Validation) MarshalTo(dAtA []byte) (int, error)
- func (*Validation) ProtoMessage()
- func (m *Validation) Reset()
- func (m *Validation) Size() (n int)
- func (m *Validation) String() string
- func (m *Validation) Unmarshal(dAtA []byte) error
- type ValidationRule
- func (*ValidationRule) Descriptor() ([]byte, []int)
- func (m *ValidationRule) GetExpression() string
- func (m *ValidationRule) GetRuleType() RuleType
- func (m *ValidationRule) Marshal() (dAtA []byte, err error)
- func (m *ValidationRule) MarshalTo(dAtA []byte) (int, error)
- func (*ValidationRule) ProtoMessage()
- func (m *ValidationRule) Reset()
- func (m *ValidationRule) Size() (n int)
- func (m *ValidationRule) String() string
- func (m *ValidationRule) Unmarshal(dAtA []byte) error
Constants ¶
This section is empty.
Variables ¶
var ( ErrInvalidLengthMetapb = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowMetapb = fmt.Errorf("proto: integer overflow") )
var CMP_name = map[int32]string{
0: "CMPEQ",
1: "CMPLT",
2: "CMPLE",
3: "CMPGT",
4: "CMPGE",
5: "CMPIn",
6: "CMPMatch",
}
var CMP_value = map[string]int32{
"CMPEQ": 0,
"CMPLT": 1,
"CMPLE": 2,
"CMPGT": 3,
"CMPGE": 4,
"CMPIn": 5,
"CMPMatch": 6,
}
var CircuitStatus_name = map[int32]string{
0: "Open",
1: "Half",
2: "Close",
}
var CircuitStatus_value = map[string]int32{
"Open": 0,
"Half": 1,
"Close": 2,
}
var LoadBalance_name = map[int32]string{
0: "RoundRobin",
1: "IPHash",
}
var LoadBalance_value = map[string]int32{
"RoundRobin": 0,
"IPHash": 1,
}
var Protocol_name = map[int32]string{
0: "HTTP",
1: "Grpc",
2: "Dubbo",
3: "SpringCloud",
}
var Protocol_value = map[string]int32{
"HTTP": 0,
"Grpc": 1,
"Dubbo": 2,
"SpringCloud": 3,
}
var RoutingStrategy_name = map[int32]string{
0: "Copy",
1: "Split",
}
var RoutingStrategy_value = map[string]int32{
"Copy": 0,
"Split": 1,
}
var RuleType_name = map[int32]string{
0: "RuleRegexp",
}
var RuleType_value = map[string]int32{
"RuleRegexp": 0,
}
var Source_name = map[int32]string{
0: "QueryString",
1: "FormData",
2: "JSONBody",
3: "Header",
4: "Cookie",
5: "PathValue",
}
var Source_value = map[string]int32{
"QueryString": 0,
"FormData": 1,
"JSONBody": 2,
"Header": 3,
"Cookie": 4,
"PathValue": 5,
}
var Status_name = map[int32]string{
0: "Down",
1: "Up",
2: "Unknown",
}
var Status_value = map[string]int32{
"Down": 0,
"Up": 1,
"Unknown": 2,
}
Functions ¶
This section is empty.
Types ¶
type API ¶
type API struct { ID uint64 `protobuf:"varint,1,opt,name=id" json:"id"` Name string `protobuf:"bytes,2,opt,name=name" json:"name"` URLPattern string `protobuf:"bytes,3,opt,name=urlPattern" json:"urlPattern"` Method string `protobuf:"bytes,4,opt,name=method" json:"method"` Domain string `protobuf:"bytes,5,opt,name=domain" json:"domain"` Status Status `protobuf:"varint,6,opt,name=status,enum=metapb.Status" json:"status"` IPAccessControl *IPAccessControl `protobuf:"bytes,7,opt,name=ipAccessControl" json:"ipAccessControl,omitempty"` DefaultValue *HTTPResult `protobuf:"bytes,8,opt,name=defaultValue" json:"defaultValue,omitempty"` Nodes []*DispatchNode `protobuf:"bytes,9,rep,name=nodes" json:"nodes,omitempty"` Perms []string `protobuf:"bytes,10,rep,name=perms" json:"perms,omitempty"` AuthFilter string `protobuf:"bytes,11,opt,name=authFilter" json:"authFilter"` RenderTemplate *RenderTemplate `protobuf:"bytes,12,opt,name=renderTemplate" json:"renderTemplate,omitempty"` UseDefault bool `protobuf:"varint,13,opt,name=useDefault" json:"useDefault"` XXX_unrecognized []byte `json:"-"` }
API is the api for dispatcher
func (*API) Descriptor ¶
func (*API) GetAuthFilter ¶
func (*API) GetDefaultValue ¶
func (m *API) GetDefaultValue() *HTTPResult
func (*API) GetIPAccessControl ¶
func (m *API) GetIPAccessControl() *IPAccessControl
func (*API) GetNodes ¶
func (m *API) GetNodes() []*DispatchNode
func (*API) GetRenderTemplate ¶
func (m *API) GetRenderTemplate() *RenderTemplate
func (*API) GetURLPattern ¶
func (*API) GetUseDefault ¶
func (*API) ProtoMessage ¶
func (*API) ProtoMessage()
type Bind ¶
type Bind struct { ClusterID uint64 `protobuf:"varint,1,opt,name=clusterID" json:"clusterID"` ServerID uint64 `protobuf:"varint,2,opt,name=serverID" json:"serverID"` XXX_unrecognized []byte `json:"-"` }
Bind is a bind pair with cluster and server
func (*Bind) Descriptor ¶
func (*Bind) GetClusterID ¶
func (*Bind) GetServerID ¶
func (*Bind) ProtoMessage ¶
func (*Bind) ProtoMessage()
type Cache ¶
type Cache struct { Keys []Parameter `protobuf:"bytes,1,rep,name=keys" json:"keys"` Deadline uint64 `protobuf:"varint,2,opt,name=deadline" json:"deadline"` Conditions []Condition `protobuf:"bytes,3,rep,name=conditions" json:"conditions"` XXX_unrecognized []byte `json:"-"` }
Cache is used for cache api result
func (*Cache) Descriptor ¶
func (*Cache) GetConditions ¶
func (*Cache) GetDeadline ¶
func (*Cache) ProtoMessage ¶
func (*Cache) ProtoMessage()
type CircuitBreaker ¶
type CircuitBreaker struct { CloseTimeout int64 `protobuf:"varint,1,opt,name=closeTimeout" json:"closeTimeout"` HalfTrafficRate int32 `protobuf:"varint,2,opt,name=halfTrafficRate" json:"halfTrafficRate"` RateCheckPeriod int64 `protobuf:"varint,3,opt,name=rateCheckPeriod" json:"rateCheckPeriod"` FailureRateToClose int32 `protobuf:"varint,4,opt,name=failureRateToClose" json:"failureRateToClose"` SucceedRateToOpen int32 `protobuf:"varint,5,opt,name=succeedRateToOpen" json:"succeedRateToOpen"` XXX_unrecognized []byte `json:"-"` }
CircuitBreaker circuit breaker
func (*CircuitBreaker) Descriptor ¶
func (*CircuitBreaker) Descriptor() ([]byte, []int)
func (*CircuitBreaker) GetCloseTimeout ¶
func (m *CircuitBreaker) GetCloseTimeout() int64
func (*CircuitBreaker) GetFailureRateToClose ¶
func (m *CircuitBreaker) GetFailureRateToClose() int32
func (*CircuitBreaker) GetHalfTrafficRate ¶
func (m *CircuitBreaker) GetHalfTrafficRate() int32
func (*CircuitBreaker) GetRateCheckPeriod ¶
func (m *CircuitBreaker) GetRateCheckPeriod() int64
func (*CircuitBreaker) GetSucceedRateToOpen ¶
func (m *CircuitBreaker) GetSucceedRateToOpen() int32
func (*CircuitBreaker) Marshal ¶
func (m *CircuitBreaker) Marshal() (dAtA []byte, err error)
func (*CircuitBreaker) ProtoMessage ¶
func (*CircuitBreaker) ProtoMessage()
func (*CircuitBreaker) Reset ¶
func (m *CircuitBreaker) Reset()
func (*CircuitBreaker) Size ¶
func (m *CircuitBreaker) Size() (n int)
func (*CircuitBreaker) String ¶
func (m *CircuitBreaker) String() string
func (*CircuitBreaker) Unmarshal ¶
func (m *CircuitBreaker) Unmarshal(dAtA []byte) error
type CircuitStatus ¶
type CircuitStatus int32
CircuitStatus is the circuit breaker status
const ( Open CircuitStatus = 0 Half CircuitStatus = 1 Close CircuitStatus = 2 )
func (CircuitStatus) Enum ¶
func (x CircuitStatus) Enum() *CircuitStatus
func (CircuitStatus) EnumDescriptor ¶
func (CircuitStatus) EnumDescriptor() ([]byte, []int)
func (CircuitStatus) String ¶
func (x CircuitStatus) String() string
func (*CircuitStatus) UnmarshalJSON ¶
func (x *CircuitStatus) UnmarshalJSON(data []byte) error
type Cluster ¶
type Cluster struct { ID uint64 `protobuf:"varint,1,opt,name=id" json:"id"` Name string `protobuf:"bytes,2,opt,name=name" json:"name"` LoadBalance LoadBalance `protobuf:"varint,3,opt,name=loadBalance,enum=metapb.LoadBalance" json:"loadBalance"` XXX_unrecognized []byte `json:"-"` }
Cluster is a set of server has same interface
func (*Cluster) Descriptor ¶
func (*Cluster) GetLoadBalance ¶
func (m *Cluster) GetLoadBalance() LoadBalance
func (*Cluster) ProtoMessage ¶
func (*Cluster) ProtoMessage()
type Condition ¶
type Condition struct { Parameter Parameter `protobuf:"bytes,1,opt,name=parameter" json:"parameter"` Cmp CMP `protobuf:"varint,2,opt,name=cmp,enum=metapb.CMP" json:"cmp"` Expect string `protobuf:"bytes,3,opt,name=expect" json:"expect"` XXX_unrecognized []byte `json:"-"` }
Condition is a condition for routing
func (*Condition) Descriptor ¶
func (*Condition) GetParameter ¶
func (*Condition) ProtoMessage ¶
func (*Condition) ProtoMessage()
type DispatchNode ¶
type DispatchNode struct { ClusterID uint64 `protobuf:"varint,1,opt,name=clusterID" json:"clusterID"` URLRewrite string `protobuf:"bytes,2,opt,name=urlRewrite" json:"urlRewrite"` AttrName string `protobuf:"bytes,3,opt,name=attrName" json:"attrName"` Validations []*Validation `protobuf:"bytes,4,rep,name=validations" json:"validations,omitempty"` Cache *Cache `protobuf:"bytes,5,opt,name=cache" json:"cache,omitempty"` DefaultValue *HTTPResult `protobuf:"bytes,6,opt,name=defaultValue" json:"defaultValue,omitempty"` UseDefault bool `protobuf:"varint,7,opt,name=useDefault" json:"useDefault"` BatchIndex int32 `protobuf:"varint,8,opt,name=batchIndex" json:"batchIndex"` XXX_unrecognized []byte `json:"-"` }
DispatchNode is the request forward to
func (*DispatchNode) Descriptor ¶
func (*DispatchNode) Descriptor() ([]byte, []int)
func (*DispatchNode) GetAttrName ¶
func (m *DispatchNode) GetAttrName() string
func (*DispatchNode) GetBatchIndex ¶
func (m *DispatchNode) GetBatchIndex() int32
func (*DispatchNode) GetCache ¶
func (m *DispatchNode) GetCache() *Cache
func (*DispatchNode) GetClusterID ¶
func (m *DispatchNode) GetClusterID() uint64
func (*DispatchNode) GetDefaultValue ¶
func (m *DispatchNode) GetDefaultValue() *HTTPResult
func (*DispatchNode) GetURLRewrite ¶
func (m *DispatchNode) GetURLRewrite() string
func (*DispatchNode) GetUseDefault ¶
func (m *DispatchNode) GetUseDefault() bool
func (*DispatchNode) GetValidations ¶
func (m *DispatchNode) GetValidations() []*Validation
func (*DispatchNode) Marshal ¶
func (m *DispatchNode) Marshal() (dAtA []byte, err error)
func (*DispatchNode) ProtoMessage ¶
func (*DispatchNode) ProtoMessage()
func (*DispatchNode) Reset ¶
func (m *DispatchNode) Reset()
func (*DispatchNode) Size ¶
func (m *DispatchNode) Size() (n int)
func (*DispatchNode) String ¶
func (m *DispatchNode) String() string
func (*DispatchNode) Unmarshal ¶
func (m *DispatchNode) Unmarshal(dAtA []byte) error
type HTTPResult ¶
type HTTPResult struct { Body []byte `protobuf:"bytes,1,opt,name=body" json:"body,omitempty"` Headers []*PairValue `protobuf:"bytes,2,rep,name=headers" json:"headers,omitempty"` Cookies []*PairValue `protobuf:"bytes,3,rep,name=cookies" json:"cookies,omitempty"` XXX_unrecognized []byte `json:"-"` }
HTTPResult is a http result
func (*HTTPResult) Descriptor ¶
func (*HTTPResult) Descriptor() ([]byte, []int)
func (*HTTPResult) GetBody ¶
func (m *HTTPResult) GetBody() []byte
func (*HTTPResult) GetCookies ¶
func (m *HTTPResult) GetCookies() []*PairValue
func (*HTTPResult) GetHeaders ¶
func (m *HTTPResult) GetHeaders() []*PairValue
func (*HTTPResult) Marshal ¶
func (m *HTTPResult) Marshal() (dAtA []byte, err error)
func (*HTTPResult) ProtoMessage ¶
func (*HTTPResult) ProtoMessage()
func (*HTTPResult) Reset ¶
func (m *HTTPResult) Reset()
func (*HTTPResult) Size ¶
func (m *HTTPResult) Size() (n int)
func (*HTTPResult) String ¶
func (m *HTTPResult) String() string
func (*HTTPResult) Unmarshal ¶
func (m *HTTPResult) Unmarshal(dAtA []byte) error
type HeathCheck ¶
type HeathCheck struct { Path string `protobuf:"bytes,1,opt,name=path" json:"path"` Body string `protobuf:"bytes,2,opt,name=body" json:"body"` CheckInterval int64 `protobuf:"varint,3,opt,name=checkInterval" json:"checkInterval"` Timeout int64 `protobuf:"varint,4,opt,name=timeout" json:"timeout"` XXX_unrecognized []byte `json:"-"` }
HeathCheck is the heath check
func (*HeathCheck) Descriptor ¶
func (*HeathCheck) Descriptor() ([]byte, []int)
func (*HeathCheck) GetBody ¶
func (m *HeathCheck) GetBody() string
func (*HeathCheck) GetCheckInterval ¶
func (m *HeathCheck) GetCheckInterval() int64
func (*HeathCheck) GetPath ¶
func (m *HeathCheck) GetPath() string
func (*HeathCheck) GetTimeout ¶
func (m *HeathCheck) GetTimeout() int64
func (*HeathCheck) Marshal ¶
func (m *HeathCheck) Marshal() (dAtA []byte, err error)
func (*HeathCheck) ProtoMessage ¶
func (*HeathCheck) ProtoMessage()
func (*HeathCheck) Reset ¶
func (m *HeathCheck) Reset()
func (*HeathCheck) Size ¶
func (m *HeathCheck) Size() (n int)
func (*HeathCheck) String ¶
func (m *HeathCheck) String() string
func (*HeathCheck) Unmarshal ¶
func (m *HeathCheck) Unmarshal(dAtA []byte) error
type IPAccessControl ¶
type IPAccessControl struct { Whitelist []string `protobuf:"bytes,1,rep,name=whitelist" json:"whitelist,omitempty"` Blacklist []string `protobuf:"bytes,2,rep,name=blacklist" json:"blacklist,omitempty"` XXX_unrecognized []byte `json:"-"` }
IPAccessControl is for ip access control
func (*IPAccessControl) Descriptor ¶
func (*IPAccessControl) Descriptor() ([]byte, []int)
func (*IPAccessControl) GetBlacklist ¶
func (m *IPAccessControl) GetBlacklist() []string
func (*IPAccessControl) GetWhitelist ¶
func (m *IPAccessControl) GetWhitelist() []string
func (*IPAccessControl) Marshal ¶
func (m *IPAccessControl) Marshal() (dAtA []byte, err error)
func (*IPAccessControl) ProtoMessage ¶
func (*IPAccessControl) ProtoMessage()
func (*IPAccessControl) Reset ¶
func (m *IPAccessControl) Reset()
func (*IPAccessControl) Size ¶
func (m *IPAccessControl) Size() (n int)
func (*IPAccessControl) String ¶
func (m *IPAccessControl) String() string
func (*IPAccessControl) Unmarshal ¶
func (m *IPAccessControl) Unmarshal(dAtA []byte) error
type LoadBalance ¶
type LoadBalance int32
LoadBalance the load balance enum
const ( RoundRobin LoadBalance = 0 IPHash LoadBalance = 1 )
func (LoadBalance) Enum ¶
func (x LoadBalance) Enum() *LoadBalance
func (LoadBalance) EnumDescriptor ¶
func (LoadBalance) EnumDescriptor() ([]byte, []int)
func (LoadBalance) String ¶
func (x LoadBalance) String() string
func (*LoadBalance) UnmarshalJSON ¶
func (x *LoadBalance) UnmarshalJSON(data []byte) error
type PairValue ¶
type PairValue struct { Name string `protobuf:"bytes,1,opt,name=name" json:"name"` Value string `protobuf:"bytes,2,opt,name=value" json:"value"` XXX_unrecognized []byte `json:"-"` }
Pair is pair value
func (*PairValue) Descriptor ¶
func (*PairValue) ProtoMessage ¶
func (*PairValue) ProtoMessage()
type Parameter ¶
type Parameter struct { Name string `protobuf:"bytes,1,opt,name=name" json:"name"` Source Source `protobuf:"varint,2,opt,name=source,enum=metapb.Source" json:"source"` Index int32 `protobuf:"varint,3,opt,name=index" json:"index"` XXX_unrecognized []byte `json:"-"` }
Parameter is a parameter from a http request
func (*Parameter) Descriptor ¶
func (*Parameter) ProtoMessage ¶
func (*Parameter) ProtoMessage()
type Protocol ¶
type Protocol int32
Protocol is the protocol of the backend api
func (Protocol) EnumDescriptor ¶
func (*Protocol) UnmarshalJSON ¶
type Proxy ¶
type Proxy struct { Addr string `protobuf:"bytes,1,opt,name=addr" json:"addr"` AddrRPC string `protobuf:"bytes,2,opt,name=addrRPC" json:"addrRPC"` XXX_unrecognized []byte `json:"-"` }
Proxy is a meta data of the gateway proxy
func (*Proxy) Descriptor ¶
func (*Proxy) GetAddrRPC ¶
func (*Proxy) ProtoMessage ¶
func (*Proxy) ProtoMessage()
type RenderAttr ¶
type RenderAttr struct { Name string `protobuf:"bytes,1,opt,name=name" json:"name"` ExtractExp string `protobuf:"bytes,2,opt,name=extractExp" json:"extractExp"` XXX_unrecognized []byte `json:"-"` }
RenderAttr the attr in the render object
func (*RenderAttr) Descriptor ¶
func (*RenderAttr) Descriptor() ([]byte, []int)
func (*RenderAttr) GetExtractExp ¶
func (m *RenderAttr) GetExtractExp() string
func (*RenderAttr) GetName ¶
func (m *RenderAttr) GetName() string
func (*RenderAttr) Marshal ¶
func (m *RenderAttr) Marshal() (dAtA []byte, err error)
func (*RenderAttr) ProtoMessage ¶
func (*RenderAttr) ProtoMessage()
func (*RenderAttr) Reset ¶
func (m *RenderAttr) Reset()
func (*RenderAttr) Size ¶
func (m *RenderAttr) Size() (n int)
func (*RenderAttr) String ¶
func (m *RenderAttr) String() string
func (*RenderAttr) Unmarshal ¶
func (m *RenderAttr) Unmarshal(dAtA []byte) error
type RenderObject ¶
type RenderObject struct { Name string `protobuf:"bytes,1,opt,name=name" json:"name"` Attrs []*RenderAttr `protobuf:"bytes,2,rep,name=attrs" json:"attrs,omitempty"` FlatAttrs bool `protobuf:"varint,3,opt,name=flatAttrs" json:"flatAttrs"` XXX_unrecognized []byte `json:"-"` }
RenderObject the object in the render template
func (*RenderObject) Descriptor ¶
func (*RenderObject) Descriptor() ([]byte, []int)
func (*RenderObject) GetAttrs ¶
func (m *RenderObject) GetAttrs() []*RenderAttr
func (*RenderObject) GetFlatAttrs ¶
func (m *RenderObject) GetFlatAttrs() bool
func (*RenderObject) GetName ¶
func (m *RenderObject) GetName() string
func (*RenderObject) Marshal ¶
func (m *RenderObject) Marshal() (dAtA []byte, err error)
func (*RenderObject) ProtoMessage ¶
func (*RenderObject) ProtoMessage()
func (*RenderObject) Reset ¶
func (m *RenderObject) Reset()
func (*RenderObject) Size ¶
func (m *RenderObject) Size() (n int)
func (*RenderObject) String ¶
func (m *RenderObject) String() string
func (*RenderObject) Unmarshal ¶
func (m *RenderObject) Unmarshal(dAtA []byte) error
type RenderTemplate ¶
type RenderTemplate struct { Objects []*RenderObject `protobuf:"bytes,1,rep,name=objects" json:"objects,omitempty"` XXX_unrecognized []byte `json:"-"` }
RenderTemplate the template that render to client
func (*RenderTemplate) Descriptor ¶
func (*RenderTemplate) Descriptor() ([]byte, []int)
func (*RenderTemplate) GetObjects ¶
func (m *RenderTemplate) GetObjects() []*RenderObject
func (*RenderTemplate) Marshal ¶
func (m *RenderTemplate) Marshal() (dAtA []byte, err error)
func (*RenderTemplate) ProtoMessage ¶
func (*RenderTemplate) ProtoMessage()
func (*RenderTemplate) Reset ¶
func (m *RenderTemplate) Reset()
func (*RenderTemplate) Size ¶
func (m *RenderTemplate) Size() (n int)
func (*RenderTemplate) String ¶
func (m *RenderTemplate) String() string
func (*RenderTemplate) Unmarshal ¶
func (m *RenderTemplate) Unmarshal(dAtA []byte) error
type Routing ¶
type Routing struct { ID uint64 `protobuf:"varint,1,opt,name=id" json:"id"` ClusterID uint64 `protobuf:"varint,2,opt,name=clusterID" json:"clusterID"` Conditions []Condition `protobuf:"bytes,3,rep,name=conditions" json:"conditions"` Strategy RoutingStrategy `protobuf:"varint,4,opt,name=strategy,enum=metapb.RoutingStrategy" json:"strategy"` TrafficRate int32 `protobuf:"varint,5,opt,name=trafficRate" json:"trafficRate"` Status Status `protobuf:"varint,6,opt,name=status,enum=metapb.Status" json:"status"` API uint64 `protobuf:"varint,7,opt,name=api" json:"api"` Name string `protobuf:"bytes,8,opt,name=name" json:"name"` XXX_unrecognized []byte `json:"-"` }
Routing is a routing
func (*Routing) Descriptor ¶
func (*Routing) GetClusterID ¶
func (*Routing) GetConditions ¶
func (*Routing) GetStrategy ¶
func (m *Routing) GetStrategy() RoutingStrategy
func (*Routing) GetTrafficRate ¶
func (*Routing) ProtoMessage ¶
func (*Routing) ProtoMessage()
type RoutingStrategy ¶
type RoutingStrategy int32
const ( Copy RoutingStrategy = 0 Split RoutingStrategy = 1 )
func (RoutingStrategy) Enum ¶
func (x RoutingStrategy) Enum() *RoutingStrategy
func (RoutingStrategy) EnumDescriptor ¶
func (RoutingStrategy) EnumDescriptor() ([]byte, []int)
func (RoutingStrategy) String ¶
func (x RoutingStrategy) String() string
func (*RoutingStrategy) UnmarshalJSON ¶
func (x *RoutingStrategy) UnmarshalJSON(data []byte) error
type RuleType ¶
type RuleType int32
const (
RuleRegexp RuleType = 0
)
func (RuleType) EnumDescriptor ¶
func (*RuleType) UnmarshalJSON ¶
type Server ¶
type Server struct { ID uint64 `protobuf:"varint,1,opt,name=id" json:"id"` Addr string `protobuf:"bytes,2,opt,name=addr" json:"addr"` Protocol Protocol `protobuf:"varint,3,opt,name=protocol,enum=metapb.Protocol" json:"protocol"` MaxQPS int64 `protobuf:"varint,4,opt,name=maxQPS" json:"maxQPS"` HeathCheck *HeathCheck `protobuf:"bytes,5,opt,name=heathCheck" json:"heathCheck,omitempty"` CircuitBreaker *CircuitBreaker `protobuf:"bytes,6,opt,name=circuitBreaker" json:"circuitBreaker,omitempty"` XXX_unrecognized []byte `json:"-"` }
Server is a backend server that provide api
func (*Server) Descriptor ¶
func (*Server) GetCircuitBreaker ¶
func (m *Server) GetCircuitBreaker() *CircuitBreaker
func (*Server) GetHeathCheck ¶
func (m *Server) GetHeathCheck() *HeathCheck
func (*Server) GetProtocol ¶
func (*Server) ProtoMessage ¶
func (*Server) ProtoMessage()
type Status ¶
type Status int32
Status is the components status
func (Status) EnumDescriptor ¶
func (*Status) UnmarshalJSON ¶
type Validation ¶
type Validation struct { Parameter Parameter `protobuf:"bytes,1,opt,name=parameter" json:"parameter"` Required bool `protobuf:"varint,2,opt,name=required" json:"required"` Rules []ValidationRule `protobuf:"bytes,3,rep,name=rules" json:"rules"` XXX_unrecognized []byte `json:"-"` }
Validation is a validation
func (*Validation) Descriptor ¶
func (*Validation) Descriptor() ([]byte, []int)
func (*Validation) GetParameter ¶
func (m *Validation) GetParameter() Parameter
func (*Validation) GetRequired ¶
func (m *Validation) GetRequired() bool
func (*Validation) GetRules ¶
func (m *Validation) GetRules() []ValidationRule
func (*Validation) Marshal ¶
func (m *Validation) Marshal() (dAtA []byte, err error)
func (*Validation) ProtoMessage ¶
func (*Validation) ProtoMessage()
func (*Validation) Reset ¶
func (m *Validation) Reset()
func (*Validation) Size ¶
func (m *Validation) Size() (n int)
func (*Validation) String ¶
func (m *Validation) String() string
func (*Validation) Unmarshal ¶
func (m *Validation) Unmarshal(dAtA []byte) error
type ValidationRule ¶
type ValidationRule struct { RuleType RuleType `protobuf:"varint,1,opt,name=ruleType,enum=metapb.RuleType" json:"ruleType"` Expression string `protobuf:"bytes,2,opt,name=expression" json:"expression"` XXX_unrecognized []byte `json:"-"` }
ValidationRule is a validation rule
func (*ValidationRule) Descriptor ¶
func (*ValidationRule) Descriptor() ([]byte, []int)
func (*ValidationRule) GetExpression ¶
func (m *ValidationRule) GetExpression() string
func (*ValidationRule) GetRuleType ¶
func (m *ValidationRule) GetRuleType() RuleType
func (*ValidationRule) Marshal ¶
func (m *ValidationRule) Marshal() (dAtA []byte, err error)
func (*ValidationRule) ProtoMessage ¶
func (*ValidationRule) ProtoMessage()
func (*ValidationRule) Reset ¶
func (m *ValidationRule) Reset()
func (*ValidationRule) Size ¶
func (m *ValidationRule) Size() (n int)
func (*ValidationRule) String ¶
func (m *ValidationRule) String() string
func (*ValidationRule) Unmarshal ¶
func (m *ValidationRule) Unmarshal(dAtA []byte) error