metapb

package
v2.5.1+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 21, 2018 License: Apache-2.0 Imports: 4 Imported by: 50

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
RetryStrategy
DispatchNode
Cache
RenderTemplate
RenderObject
RenderAttr
API
Condition
Routing
WebSocketOptions
System
CountMetric

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthMetapb = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowMetapb   = fmt.Errorf("proto: integer overflow")
)
View Source
var CMP_name = map[int32]string{
	0: "CMPEQ",
	1: "CMPLT",
	2: "CMPLE",
	3: "CMPGT",
	4: "CMPGE",
	5: "CMPIn",
	6: "CMPMatch",
}
View Source
var CMP_value = map[string]int32{
	"CMPEQ":    0,
	"CMPLT":    1,
	"CMPLE":    2,
	"CMPGT":    3,
	"CMPGE":    4,
	"CMPIn":    5,
	"CMPMatch": 6,
}
View Source
var CircuitStatus_name = map[int32]string{
	0: "Open",
	1: "Half",
	2: "Close",
}
View Source
var CircuitStatus_value = map[string]int32{
	"Open":  0,
	"Half":  1,
	"Close": 2,
}
View Source
var LoadBalance_name = map[int32]string{
	0: "RoundRobin",
	1: "IPHash",
}
View Source
var LoadBalance_value = map[string]int32{
	"RoundRobin": 0,
	"IPHash":     1,
}
View Source
var MatchRule_name = map[int32]string{
	0: "MatchDefault",
	1: "MatchAll",
	2: "MatchAny",
}
View Source
var MatchRule_value = map[string]int32{
	"MatchDefault": 0,
	"MatchAll":     1,
	"MatchAny":     2,
}
View Source
var Protocol_name = map[int32]string{
	0: "HTTP",
	1: "Grpc",
	2: "Dubbo",
	3: "SpringCloud",
}
View Source
var Protocol_value = map[string]int32{
	"HTTP":        0,
	"Grpc":        1,
	"Dubbo":       2,
	"SpringCloud": 3,
}
View Source
var RoutingStrategy_name = map[int32]string{
	0: "Copy",
	1: "Split",
}
View Source
var RoutingStrategy_value = map[string]int32{
	"Copy":  0,
	"Split": 1,
}
View Source
var RuleType_name = map[int32]string{
	0: "RuleRegexp",
}
View Source
var RuleType_value = map[string]int32{
	"RuleRegexp": 0,
}
View Source
var Source_name = map[int32]string{
	0: "QueryString",
	1: "FormData",
	2: "JSONBody",
	3: "Header",
	4: "Cookie",
	5: "PathValue",
}
View Source
var Source_value = map[string]int32{
	"QueryString": 0,
	"FormData":    1,
	"JSONBody":    2,
	"Header":      3,
	"Cookie":      4,
	"PathValue":   5,
}
View Source
var Status_name = map[int32]string{
	0: "Down",
	1: "Up",
	2: "Unknown",
}
View Source
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"`
	MatchRule        MatchRule         `protobuf:"varint,14,opt,name=matchRule,enum=metapb.MatchRule" json:"matchRule"`
	Position         uint32            `protobuf:"varint,15,opt,name=position" json:"position"`
	Tags             []*PairValue      `protobuf:"bytes,16,rep,name=tags" json:"tags,omitempty"`
	WebSocketOptions *WebSocketOptions `protobuf:"bytes,17,opt,name=webSocketOptions" json:"webSocketOptions,omitempty"`
	XXX_unrecognized []byte            `json:"-"`
}

API is the api for dispatcher

func (*API) Descriptor

func (*API) Descriptor() ([]byte, []int)

func (*API) GetAuthFilter

func (m *API) GetAuthFilter() string

func (*API) GetDefaultValue

func (m *API) GetDefaultValue() *HTTPResult

func (*API) GetDomain

func (m *API) GetDomain() string

func (*API) GetID

func (m *API) GetID() uint64

func (*API) GetIPAccessControl

func (m *API) GetIPAccessControl() *IPAccessControl

func (*API) GetMatchRule

func (m *API) GetMatchRule() MatchRule

func (*API) GetMethod

func (m *API) GetMethod() string

func (*API) GetName

func (m *API) GetName() string

func (*API) GetNodes

func (m *API) GetNodes() []*DispatchNode

func (*API) GetPerms

func (m *API) GetPerms() []string

func (*API) GetPosition

func (m *API) GetPosition() uint32

func (*API) GetRenderTemplate

func (m *API) GetRenderTemplate() *RenderTemplate

func (*API) GetStatus

func (m *API) GetStatus() Status

func (*API) GetTags

func (m *API) GetTags() []*PairValue

func (*API) GetURLPattern

func (m *API) GetURLPattern() string

func (*API) GetUseDefault

func (m *API) GetUseDefault() bool

func (*API) GetWebSocketOptions

func (m *API) GetWebSocketOptions() *WebSocketOptions

func (*API) Marshal

func (m *API) Marshal() (dAtA []byte, err error)

func (*API) MarshalTo

func (m *API) MarshalTo(dAtA []byte) (int, error)

func (*API) ProtoMessage

func (*API) ProtoMessage()

func (*API) Reset

func (m *API) Reset()

func (*API) Size

func (m *API) Size() (n int)

func (*API) String

func (m *API) String() string

func (*API) Unmarshal

func (m *API) Unmarshal(dAtA []byte) error

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) Descriptor() ([]byte, []int)

func (*Bind) GetClusterID

func (m *Bind) GetClusterID() uint64

func (*Bind) GetServerID

func (m *Bind) GetServerID() uint64

func (*Bind) Marshal

func (m *Bind) Marshal() (dAtA []byte, err error)

func (*Bind) MarshalTo

func (m *Bind) MarshalTo(dAtA []byte) (int, error)

func (*Bind) ProtoMessage

func (*Bind) ProtoMessage()

func (*Bind) Reset

func (m *Bind) Reset()

func (*Bind) Size

func (m *Bind) Size() (n int)

func (*Bind) String

func (m *Bind) String() string

func (*Bind) Unmarshal

func (m *Bind) Unmarshal(dAtA []byte) error

type CMP

type CMP int32
const (
	CMPEQ    CMP = 0
	CMPLT    CMP = 1
	CMPLE    CMP = 2
	CMPGT    CMP = 3
	CMPGE    CMP = 4
	CMPIn    CMP = 5
	CMPMatch CMP = 6
)

func (CMP) Enum

func (x CMP) Enum() *CMP

func (CMP) EnumDescriptor

func (CMP) EnumDescriptor() ([]byte, []int)

func (CMP) String

func (x CMP) String() string

func (*CMP) UnmarshalJSON

func (x *CMP) UnmarshalJSON(data []byte) error

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) Descriptor() ([]byte, []int)

func (*Cache) GetConditions

func (m *Cache) GetConditions() []Condition

func (*Cache) GetDeadline

func (m *Cache) GetDeadline() uint64

func (*Cache) GetKeys

func (m *Cache) GetKeys() []Parameter

func (*Cache) Marshal

func (m *Cache) Marshal() (dAtA []byte, err error)

func (*Cache) MarshalTo

func (m *Cache) MarshalTo(dAtA []byte) (int, error)

func (*Cache) ProtoMessage

func (*Cache) ProtoMessage()

func (*Cache) Reset

func (m *Cache) Reset()

func (*Cache) Size

func (m *Cache) Size() (n int)

func (*Cache) String

func (m *Cache) String() string

func (*Cache) Unmarshal

func (m *Cache) Unmarshal(dAtA []byte) error

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) MarshalTo

func (m *CircuitBreaker) MarshalTo(dAtA []byte) (int, 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) Descriptor() ([]byte, []int)

func (*Cluster) GetID

func (m *Cluster) GetID() uint64

func (*Cluster) GetLoadBalance

func (m *Cluster) GetLoadBalance() LoadBalance

func (*Cluster) GetName

func (m *Cluster) GetName() string

func (*Cluster) Marshal

func (m *Cluster) Marshal() (dAtA []byte, err error)

func (*Cluster) MarshalTo

func (m *Cluster) MarshalTo(dAtA []byte) (int, error)

func (*Cluster) ProtoMessage

func (*Cluster) ProtoMessage()

func (*Cluster) Reset

func (m *Cluster) Reset()

func (*Cluster) Size

func (m *Cluster) Size() (n int)

func (*Cluster) String

func (m *Cluster) String() string

func (*Cluster) Unmarshal

func (m *Cluster) Unmarshal(dAtA []byte) error

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) Descriptor() ([]byte, []int)

func (*Condition) GetCmp

func (m *Condition) GetCmp() CMP

func (*Condition) GetExpect

func (m *Condition) GetExpect() string

func (*Condition) GetParameter

func (m *Condition) GetParameter() Parameter

func (*Condition) Marshal

func (m *Condition) Marshal() (dAtA []byte, err error)

func (*Condition) MarshalTo

func (m *Condition) MarshalTo(dAtA []byte) (int, error)

func (*Condition) ProtoMessage

func (*Condition) ProtoMessage()

func (*Condition) Reset

func (m *Condition) Reset()

func (*Condition) Size

func (m *Condition) Size() (n int)

func (*Condition) String

func (m *Condition) String() string

func (*Condition) Unmarshal

func (m *Condition) Unmarshal(dAtA []byte) error

type CountMetric

type CountMetric struct {
	Cluster          int64  `protobuf:"varint,1,opt,name=cluster" json:"cluster"`
	Server           int64  `protobuf:"varint,2,opt,name=server" json:"server"`
	API              int64  `protobuf:"varint,3,opt,name=api" json:"api"`
	Routing          int64  `protobuf:"varint,4,opt,name=Routing" json:"Routing"`
	XXX_unrecognized []byte `json:"-"`
}

func (*CountMetric) Descriptor

func (*CountMetric) Descriptor() ([]byte, []int)

func (*CountMetric) GetAPI

func (m *CountMetric) GetAPI() int64

func (*CountMetric) GetCluster

func (m *CountMetric) GetCluster() int64

func (*CountMetric) GetRouting

func (m *CountMetric) GetRouting() int64

func (*CountMetric) GetServer

func (m *CountMetric) GetServer() int64

func (*CountMetric) Marshal

func (m *CountMetric) Marshal() (dAtA []byte, err error)

func (*CountMetric) MarshalTo

func (m *CountMetric) MarshalTo(dAtA []byte) (int, error)

func (*CountMetric) ProtoMessage

func (*CountMetric) ProtoMessage()

func (*CountMetric) Reset

func (m *CountMetric) Reset()

func (*CountMetric) Size

func (m *CountMetric) Size() (n int)

func (*CountMetric) String

func (m *CountMetric) String() string

func (*CountMetric) Unmarshal

func (m *CountMetric) Unmarshal(dAtA []byte) error

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"`
	RetryStrategy    *RetryStrategy `protobuf:"bytes,9,opt,name=retryStrategy" json:"retryStrategy,omitempty"`
	WriteTimeout     int64          `protobuf:"varint,10,opt,name=writeTimeout" json:"writeTimeout"`
	ReadTimeout      int64          `protobuf:"varint,11,opt,name=readTimeout" json:"readTimeout"`
	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) GetReadTimeout

func (m *DispatchNode) GetReadTimeout() int64

func (*DispatchNode) GetRetryStrategy

func (m *DispatchNode) GetRetryStrategy() *RetryStrategy

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) GetWriteTimeout

func (m *DispatchNode) GetWriteTimeout() int64

func (*DispatchNode) Marshal

func (m *DispatchNode) Marshal() (dAtA []byte, err error)

func (*DispatchNode) MarshalTo

func (m *DispatchNode) MarshalTo(dAtA []byte) (int, 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"`
	Code             int32        `protobuf:"varint,4,opt,name=code" json:"code"`
	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) GetCode

func (m *HTTPResult) GetCode() int32

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) MarshalTo

func (m *HTTPResult) MarshalTo(dAtA []byte) (int, 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) MarshalTo

func (m *HeathCheck) MarshalTo(dAtA []byte) (int, 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) MarshalTo

func (m *IPAccessControl) MarshalTo(dAtA []byte) (int, 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 MatchRule

type MatchRule int32
const (
	MatchDefault MatchRule = 0
	MatchAll     MatchRule = 1
	MatchAny     MatchRule = 2
)

func (MatchRule) Enum

func (x MatchRule) Enum() *MatchRule

func (MatchRule) EnumDescriptor

func (MatchRule) EnumDescriptor() ([]byte, []int)

func (MatchRule) String

func (x MatchRule) String() string

func (*MatchRule) UnmarshalJSON

func (x *MatchRule) 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) Descriptor() ([]byte, []int)

func (*PairValue) GetName

func (m *PairValue) GetName() string

func (*PairValue) GetValue

func (m *PairValue) GetValue() string

func (*PairValue) Marshal

func (m *PairValue) Marshal() (dAtA []byte, err error)

func (*PairValue) MarshalTo

func (m *PairValue) MarshalTo(dAtA []byte) (int, error)

func (*PairValue) ProtoMessage

func (*PairValue) ProtoMessage()

func (*PairValue) Reset

func (m *PairValue) Reset()

func (*PairValue) Size

func (m *PairValue) Size() (n int)

func (*PairValue) String

func (m *PairValue) String() string

func (*PairValue) Unmarshal

func (m *PairValue) Unmarshal(dAtA []byte) error

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) Descriptor() ([]byte, []int)

func (*Parameter) GetIndex

func (m *Parameter) GetIndex() int32

func (*Parameter) GetName

func (m *Parameter) GetName() string

func (*Parameter) GetSource

func (m *Parameter) GetSource() Source

func (*Parameter) Marshal

func (m *Parameter) Marshal() (dAtA []byte, err error)

func (*Parameter) MarshalTo

func (m *Parameter) MarshalTo(dAtA []byte) (int, error)

func (*Parameter) ProtoMessage

func (*Parameter) ProtoMessage()

func (*Parameter) Reset

func (m *Parameter) Reset()

func (*Parameter) Size

func (m *Parameter) Size() (n int)

func (*Parameter) String

func (m *Parameter) String() string

func (*Parameter) Unmarshal

func (m *Parameter) Unmarshal(dAtA []byte) error

type Protocol

type Protocol int32

Protocol is the protocol of the backend api

const (
	HTTP        Protocol = 0
	Grpc        Protocol = 1
	Dubbo       Protocol = 2
	SpringCloud Protocol = 3
)

func (Protocol) Enum

func (x Protocol) Enum() *Protocol

func (Protocol) EnumDescriptor

func (Protocol) EnumDescriptor() ([]byte, []int)

func (Protocol) String

func (x Protocol) String() string

func (*Protocol) UnmarshalJSON

func (x *Protocol) UnmarshalJSON(data []byte) error

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) Descriptor() ([]byte, []int)

func (*Proxy) GetAddr

func (m *Proxy) GetAddr() string

func (*Proxy) GetAddrRPC

func (m *Proxy) GetAddrRPC() string

func (*Proxy) Marshal

func (m *Proxy) Marshal() (dAtA []byte, err error)

func (*Proxy) MarshalTo

func (m *Proxy) MarshalTo(dAtA []byte) (int, error)

func (*Proxy) ProtoMessage

func (*Proxy) ProtoMessage()

func (*Proxy) Reset

func (m *Proxy) Reset()

func (*Proxy) Size

func (m *Proxy) Size() (n int)

func (*Proxy) String

func (m *Proxy) String() string

func (*Proxy) Unmarshal

func (m *Proxy) Unmarshal(dAtA []byte) error

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) MarshalTo

func (m *RenderAttr) MarshalTo(dAtA []byte) (int, 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) MarshalTo

func (m *RenderObject) MarshalTo(dAtA []byte) (int, 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) MarshalTo

func (m *RenderTemplate) MarshalTo(dAtA []byte) (int, 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 RetryStrategy

type RetryStrategy struct {
	Interval         int32   `protobuf:"varint,1,opt,name=interval" json:"interval"`
	MaxTimes         int32   `protobuf:"varint,2,opt,name=maxTimes" json:"maxTimes"`
	Codes            []int32 `protobuf:"varint,3,rep,name=codes" json:"codes,omitempty"`
	XXX_unrecognized []byte  `json:"-"`
}

RetryStrategy retry strategy

func (*RetryStrategy) Descriptor

func (*RetryStrategy) Descriptor() ([]byte, []int)

func (*RetryStrategy) GetCodes

func (m *RetryStrategy) GetCodes() []int32

func (*RetryStrategy) GetInterval

func (m *RetryStrategy) GetInterval() int32

func (*RetryStrategy) GetMaxTimes

func (m *RetryStrategy) GetMaxTimes() int32

func (*RetryStrategy) Marshal

func (m *RetryStrategy) Marshal() (dAtA []byte, err error)

func (*RetryStrategy) MarshalTo

func (m *RetryStrategy) MarshalTo(dAtA []byte) (int, error)

func (*RetryStrategy) ProtoMessage

func (*RetryStrategy) ProtoMessage()

func (*RetryStrategy) Reset

func (m *RetryStrategy) Reset()

func (*RetryStrategy) Size

func (m *RetryStrategy) Size() (n int)

func (*RetryStrategy) String

func (m *RetryStrategy) String() string

func (*RetryStrategy) Unmarshal

func (m *RetryStrategy) 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) Descriptor() ([]byte, []int)

func (*Routing) GetAPI

func (m *Routing) GetAPI() uint64

func (*Routing) GetClusterID

func (m *Routing) GetClusterID() uint64

func (*Routing) GetConditions

func (m *Routing) GetConditions() []Condition

func (*Routing) GetID

func (m *Routing) GetID() uint64

func (*Routing) GetName

func (m *Routing) GetName() string

func (*Routing) GetStatus

func (m *Routing) GetStatus() Status

func (*Routing) GetStrategy

func (m *Routing) GetStrategy() RoutingStrategy

func (*Routing) GetTrafficRate

func (m *Routing) GetTrafficRate() int32

func (*Routing) Marshal

func (m *Routing) Marshal() (dAtA []byte, err error)

func (*Routing) MarshalTo

func (m *Routing) MarshalTo(dAtA []byte) (int, error)

func (*Routing) ProtoMessage

func (*Routing) ProtoMessage()

func (*Routing) Reset

func (m *Routing) Reset()

func (*Routing) Size

func (m *Routing) Size() (n int)

func (*Routing) String

func (m *Routing) String() string

func (*Routing) Unmarshal

func (m *Routing) Unmarshal(dAtA []byte) error

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) Enum

func (x RuleType) Enum() *RuleType

func (RuleType) EnumDescriptor

func (RuleType) EnumDescriptor() ([]byte, []int)

func (RuleType) String

func (x RuleType) String() string

func (*RuleType) UnmarshalJSON

func (x *RuleType) UnmarshalJSON(data []byte) error

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) Descriptor() ([]byte, []int)

func (*Server) GetAddr

func (m *Server) GetAddr() string

func (*Server) GetCircuitBreaker

func (m *Server) GetCircuitBreaker() *CircuitBreaker

func (*Server) GetHeathCheck

func (m *Server) GetHeathCheck() *HeathCheck

func (*Server) GetID

func (m *Server) GetID() uint64

func (*Server) GetMaxQPS

func (m *Server) GetMaxQPS() int64

func (*Server) GetProtocol

func (m *Server) GetProtocol() Protocol

func (*Server) Marshal

func (m *Server) Marshal() (dAtA []byte, err error)

func (*Server) MarshalTo

func (m *Server) MarshalTo(dAtA []byte) (int, error)

func (*Server) ProtoMessage

func (*Server) ProtoMessage()

func (*Server) Reset

func (m *Server) Reset()

func (*Server) Size

func (m *Server) Size() (n int)

func (*Server) String

func (m *Server) String() string

func (*Server) Unmarshal

func (m *Server) Unmarshal(dAtA []byte) error

type Source

type Source int32
const (
	QueryString Source = 0
	FormData    Source = 1
	JSONBody    Source = 2
	Header      Source = 3
	Cookie      Source = 4
	PathValue   Source = 5
)

func (Source) Enum

func (x Source) Enum() *Source

func (Source) EnumDescriptor

func (Source) EnumDescriptor() ([]byte, []int)

func (Source) String

func (x Source) String() string

func (*Source) UnmarshalJSON

func (x *Source) UnmarshalJSON(data []byte) error

type Status

type Status int32

Status is the components status

const (
	Down    Status = 0
	Up      Status = 1
	Unknown Status = 2
)

func (Status) Enum

func (x Status) Enum() *Status

func (Status) EnumDescriptor

func (Status) EnumDescriptor() ([]byte, []int)

func (Status) String

func (x Status) String() string

func (*Status) UnmarshalJSON

func (x *Status) UnmarshalJSON(data []byte) error

type System

type System struct {
	Count            CountMetric `protobuf:"bytes,1,opt,name=count" json:"count"`
	XXX_unrecognized []byte      `json:"-"`
}

System system

func (*System) Descriptor

func (*System) Descriptor() ([]byte, []int)

func (*System) GetCount

func (m *System) GetCount() CountMetric

func (*System) Marshal

func (m *System) Marshal() (dAtA []byte, err error)

func (*System) MarshalTo

func (m *System) MarshalTo(dAtA []byte) (int, error)

func (*System) ProtoMessage

func (*System) ProtoMessage()

func (*System) Reset

func (m *System) Reset()

func (*System) Size

func (m *System) Size() (n int)

func (*System) String

func (m *System) String() string

func (*System) Unmarshal

func (m *System) Unmarshal(dAtA []byte) error

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) MarshalTo

func (m *Validation) MarshalTo(dAtA []byte) (int, 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) MarshalTo

func (m *ValidationRule) MarshalTo(dAtA []byte) (int, 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

type WebSocketOptions

type WebSocketOptions struct {
	Origin           string `protobuf:"bytes,1,opt,name=origin" json:"origin"`
	XXX_unrecognized []byte `json:"-"`
}

WebSocketOptions websocket options

func (*WebSocketOptions) Descriptor

func (*WebSocketOptions) Descriptor() ([]byte, []int)

func (*WebSocketOptions) GetOrigin

func (m *WebSocketOptions) GetOrigin() string

func (*WebSocketOptions) Marshal

func (m *WebSocketOptions) Marshal() (dAtA []byte, err error)

func (*WebSocketOptions) MarshalTo

func (m *WebSocketOptions) MarshalTo(dAtA []byte) (int, error)

func (*WebSocketOptions) ProtoMessage

func (*WebSocketOptions) ProtoMessage()

func (*WebSocketOptions) Reset

func (m *WebSocketOptions) Reset()

func (*WebSocketOptions) Size

func (m *WebSocketOptions) Size() (n int)

func (*WebSocketOptions) String

func (m *WebSocketOptions) String() string

func (*WebSocketOptions) Unmarshal

func (m *WebSocketOptions) Unmarshal(dAtA []byte) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL