apisix

package
v0.0.0-...-39db037 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2021 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Route_RouteStatus_name = map[int32]string{
		0: "Disable",
		1: "Enable",
	}
	Route_RouteStatus_value = map[string]int32{
		"Disable": 0,
		"Enable":  1,
	}
)

Enum value maps for Route_RouteStatus.

View Source
var File_route_proto protoreflect.FileDescriptor
View Source
var File_upstream_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type ActiveHealthCheck

type ActiveHealthCheck struct {

	// The health check probe type.
	Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"`
	// Timeout setting for the probe requests.
	Timeout float64 `protobuf:"fixed64,2,opt,name=timeout,proto3" json:"timeout,omitempty"`
	// How many probes can be sent simultaneously.
	Concurrency int32 `protobuf:"varint,3,opt,name=concurrency,proto3" json:"concurrency,omitempty"`
	// Host value for HTTP probes.
	Host string `protobuf:"bytes,4,opt,name=host,proto3" json:"host,omitempty"`
	// Specified port for the probe to sent.
	Port int32 `protobuf:"varint,5,opt,name=port,proto3" json:"port,omitempty"`
	// the URI path for HTTP probes.
	HttpPath string `protobuf:"bytes,6,opt,name=http_path,json=httpPath,proto3" json:"http_path,omitempty"`
	// Whether to verify the TLS/SSL certificate.
	HttpsVerifyCertificate bool `` /* 130-byte string literal not displayed */
	// health check for judging nodes become healthy.
	Healthy *ActiveHealthCheckHealthy `protobuf:"bytes,8,opt,name=healthy,proto3" json:"healthy,omitempty"`
	// health check for judging nodes become unhealthy.
	Unhealthy *ActiveHealthCheckUnhealthy `protobuf:"bytes,9,opt,name=unhealthy,proto3" json:"unhealthy,omitempty"`
	// The extra request headers to carry for HTTP probes.
	ReqHeaders []string `protobuf:"bytes,10,rep,name=req_headers,json=reqHeaders,proto3" json:"req_headers,omitempty"`
	// contains filtered or unexported fields
}

[#protodoc-title: Acitve Health Check configuration]

func (*ActiveHealthCheck) Descriptor deprecated

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

Deprecated: Use ActiveHealthCheck.ProtoReflect.Descriptor instead.

func (*ActiveHealthCheck) GetConcurrency

func (x *ActiveHealthCheck) GetConcurrency() int32

func (*ActiveHealthCheck) GetHealthy

func (*ActiveHealthCheck) GetHost

func (x *ActiveHealthCheck) GetHost() string

func (*ActiveHealthCheck) GetHttpPath

func (x *ActiveHealthCheck) GetHttpPath() string

func (*ActiveHealthCheck) GetHttpsVerifyCertificate

func (x *ActiveHealthCheck) GetHttpsVerifyCertificate() bool

func (*ActiveHealthCheck) GetPort

func (x *ActiveHealthCheck) GetPort() int32

func (*ActiveHealthCheck) GetReqHeaders

func (x *ActiveHealthCheck) GetReqHeaders() []string

func (*ActiveHealthCheck) GetTimeout

func (x *ActiveHealthCheck) GetTimeout() float64

func (*ActiveHealthCheck) GetType

func (x *ActiveHealthCheck) GetType() string

func (*ActiveHealthCheck) GetUnhealthy

func (x *ActiveHealthCheck) GetUnhealthy() *ActiveHealthCheckUnhealthy

func (*ActiveHealthCheck) ProtoMessage

func (*ActiveHealthCheck) ProtoMessage()

func (*ActiveHealthCheck) ProtoReflect

func (x *ActiveHealthCheck) ProtoReflect() protoreflect.Message

func (*ActiveHealthCheck) Reset

func (x *ActiveHealthCheck) Reset()

func (*ActiveHealthCheck) String

func (x *ActiveHealthCheck) String() string

func (*ActiveHealthCheck) Validate

func (m *ActiveHealthCheck) Validate() error

Validate checks the field values on ActiveHealthCheck with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

type ActiveHealthCheckHealthy

type ActiveHealthCheckHealthy struct {

	// The interval to send a probe request.
	Interval int32 `protobuf:"varint,1,opt,name=interval,proto3" json:"interval,omitempty"`
	// Probes with status codes in this array will be treated as healthy.
	HttpStatuses []int32 `protobuf:"varint,2,rep,packed,name=http_statuses,json=httpStatuses,proto3" json:"http_statuses,omitempty"`
	// How many consecutive success times should meet before a node is set to healthy.
	Successes int32 `protobuf:"varint,3,opt,name=successes,proto3" json:"successes,omitempty"`
	// contains filtered or unexported fields
}

[#protodoc-title: Active Health Check configuration for judging nodes become healthy]

func (*ActiveHealthCheckHealthy) Descriptor deprecated

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

Deprecated: Use ActiveHealthCheckHealthy.ProtoReflect.Descriptor instead.

func (*ActiveHealthCheckHealthy) GetHttpStatuses

func (x *ActiveHealthCheckHealthy) GetHttpStatuses() []int32

func (*ActiveHealthCheckHealthy) GetInterval

func (x *ActiveHealthCheckHealthy) GetInterval() int32

func (*ActiveHealthCheckHealthy) GetSuccesses

func (x *ActiveHealthCheckHealthy) GetSuccesses() int32

func (*ActiveHealthCheckHealthy) ProtoMessage

func (*ActiveHealthCheckHealthy) ProtoMessage()

func (*ActiveHealthCheckHealthy) ProtoReflect

func (x *ActiveHealthCheckHealthy) ProtoReflect() protoreflect.Message

func (*ActiveHealthCheckHealthy) Reset

func (x *ActiveHealthCheckHealthy) Reset()

func (*ActiveHealthCheckHealthy) String

func (x *ActiveHealthCheckHealthy) String() string

func (*ActiveHealthCheckHealthy) Validate

func (m *ActiveHealthCheckHealthy) Validate() error

Validate checks the field values on ActiveHealthCheckHealthy with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

type ActiveHealthCheckHealthyValidationError

type ActiveHealthCheckHealthyValidationError struct {
	// contains filtered or unexported fields
}

ActiveHealthCheckHealthyValidationError is the validation error returned by ActiveHealthCheckHealthy.Validate if the designated constraints aren't met.

func (ActiveHealthCheckHealthyValidationError) Cause

Cause function returns cause value.

func (ActiveHealthCheckHealthyValidationError) Error

Error satisfies the builtin error interface

func (ActiveHealthCheckHealthyValidationError) ErrorName

ErrorName returns error name.

func (ActiveHealthCheckHealthyValidationError) Field

Field function returns field value.

func (ActiveHealthCheckHealthyValidationError) Key

Key function returns key value.

func (ActiveHealthCheckHealthyValidationError) Reason

Reason function returns reason value.

type ActiveHealthCheckUnhealthy

type ActiveHealthCheckUnhealthy struct {

	// The interval to send a probe request.
	Interval int32 `protobuf:"varint,1,opt,name=interval,proto3" json:"interval,omitempty"`
	// Probes with status codes in this array will be treated as unhealthy.
	HttpStatuses []int32 `protobuf:"varint,2,rep,packed,name=http_statuses,json=httpStatuses,proto3" json:"http_statuses,omitempty"`
	// How many consecutive failures (http) occur should meet before a node is set to healthy.
	HttpFailures int32 `protobuf:"varint,3,opt,name=http_failures,json=httpFailures,proto3" json:"http_failures,omitempty"`
	// How many consecutive failures (tcp) occur should meet before a node is set to healthy.
	TcpFailures int32 `protobuf:"varint,4,opt,name=tcp_failures,json=tcpFailures,proto3" json:"tcp_failures,omitempty"`
	// How many consecutive timeouts occur should meet before a node is set to healthy.
	Timeouts int32 `protobuf:"varint,5,opt,name=timeouts,proto3" json:"timeouts,omitempty"`
	// contains filtered or unexported fields
}

[#protodoc-title: Active Health Check configuration for judging nodes become unhealthy]

func (*ActiveHealthCheckUnhealthy) Descriptor deprecated

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

Deprecated: Use ActiveHealthCheckUnhealthy.ProtoReflect.Descriptor instead.

func (*ActiveHealthCheckUnhealthy) GetHttpFailures

func (x *ActiveHealthCheckUnhealthy) GetHttpFailures() int32

func (*ActiveHealthCheckUnhealthy) GetHttpStatuses

func (x *ActiveHealthCheckUnhealthy) GetHttpStatuses() []int32

func (*ActiveHealthCheckUnhealthy) GetInterval

func (x *ActiveHealthCheckUnhealthy) GetInterval() int32

func (*ActiveHealthCheckUnhealthy) GetTcpFailures

func (x *ActiveHealthCheckUnhealthy) GetTcpFailures() int32

func (*ActiveHealthCheckUnhealthy) GetTimeouts

func (x *ActiveHealthCheckUnhealthy) GetTimeouts() int32

func (*ActiveHealthCheckUnhealthy) ProtoMessage

func (*ActiveHealthCheckUnhealthy) ProtoMessage()

func (*ActiveHealthCheckUnhealthy) ProtoReflect

func (*ActiveHealthCheckUnhealthy) Reset

func (x *ActiveHealthCheckUnhealthy) Reset()

func (*ActiveHealthCheckUnhealthy) String

func (x *ActiveHealthCheckUnhealthy) String() string

func (*ActiveHealthCheckUnhealthy) Validate

func (m *ActiveHealthCheckUnhealthy) Validate() error

Validate checks the field values on ActiveHealthCheckUnhealthy with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

type ActiveHealthCheckUnhealthyValidationError

type ActiveHealthCheckUnhealthyValidationError struct {
	// contains filtered or unexported fields
}

ActiveHealthCheckUnhealthyValidationError is the validation error returned by ActiveHealthCheckUnhealthy.Validate if the designated constraints aren't met.

func (ActiveHealthCheckUnhealthyValidationError) Cause

Cause function returns cause value.

func (ActiveHealthCheckUnhealthyValidationError) Error

Error satisfies the builtin error interface

func (ActiveHealthCheckUnhealthyValidationError) ErrorName

ErrorName returns error name.

func (ActiveHealthCheckUnhealthyValidationError) Field

Field function returns field value.

func (ActiveHealthCheckUnhealthyValidationError) Key

Key function returns key value.

func (ActiveHealthCheckUnhealthyValidationError) Reason

Reason function returns reason value.

type ActiveHealthCheckValidationError

type ActiveHealthCheckValidationError struct {
	// contains filtered or unexported fields
}

ActiveHealthCheckValidationError is the validation error returned by ActiveHealthCheck.Validate if the designated constraints aren't met.

func (ActiveHealthCheckValidationError) Cause

Cause function returns cause value.

func (ActiveHealthCheckValidationError) Error

Error satisfies the builtin error interface

func (ActiveHealthCheckValidationError) ErrorName

ErrorName returns error name.

func (ActiveHealthCheckValidationError) Field

Field function returns field value.

func (ActiveHealthCheckValidationError) Key

Key function returns key value.

func (ActiveHealthCheckValidationError) Reason

Reason function returns reason value.

type HealthCheck

type HealthCheck struct {

	// Active health check settings.
	Active *ActiveHealthCheck `protobuf:"bytes,1,opt,name=active,proto3" json:"active,omitempty"`
	// Passive health check settings.
	Passive *PassiveHealthCheck `protobuf:"bytes,2,opt,name=passive,proto3" json:"passive,omitempty"`
	// contains filtered or unexported fields
}

[#protodoc-title: The Apache APISIX Upstream Health Check configuration]

func (*HealthCheck) Descriptor deprecated

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

Deprecated: Use HealthCheck.ProtoReflect.Descriptor instead.

func (*HealthCheck) GetActive

func (x *HealthCheck) GetActive() *ActiveHealthCheck

func (*HealthCheck) GetPassive

func (x *HealthCheck) GetPassive() *PassiveHealthCheck

func (*HealthCheck) ProtoMessage

func (*HealthCheck) ProtoMessage()

func (*HealthCheck) ProtoReflect

func (x *HealthCheck) ProtoReflect() protoreflect.Message

func (*HealthCheck) Reset

func (x *HealthCheck) Reset()

func (*HealthCheck) String

func (x *HealthCheck) String() string

func (*HealthCheck) Validate

func (m *HealthCheck) Validate() error

Validate checks the field values on HealthCheck with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

type HealthCheckValidationError

type HealthCheckValidationError struct {
	// contains filtered or unexported fields
}

HealthCheckValidationError is the validation error returned by HealthCheck.Validate if the designated constraints aren't met.

func (HealthCheckValidationError) Cause

Cause function returns cause value.

func (HealthCheckValidationError) Error

Error satisfies the builtin error interface

func (HealthCheckValidationError) ErrorName

func (e HealthCheckValidationError) ErrorName() string

ErrorName returns error name.

func (HealthCheckValidationError) Field

Field function returns field value.

func (HealthCheckValidationError) Key

Key function returns key value.

func (HealthCheckValidationError) Reason

Reason function returns reason value.

type Node

type Node struct {

	// The endpoint host (could be IPv4/IPv6 or domain).
	Host string `protobuf:"bytes,1,opt,name=host,proto3" json:"host,omitempty"`
	// The endpoint port.
	Port int32 `protobuf:"varint,2,opt,name=port,proto3" json:"port,omitempty"`
	// The endpoint weight.
	Weight   int32               `protobuf:"varint,3,opt,name=weight,proto3" json:"weight,omitempty"`
	Metadata map[string]*any.Any `` /* 157-byte string literal not displayed */
	// contains filtered or unexported fields
}

[#protodoc-title: Upstream Node]

func (*Node) Descriptor deprecated

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

Deprecated: Use Node.ProtoReflect.Descriptor instead.

func (*Node) GetHost

func (x *Node) GetHost() string

func (*Node) GetMetadata

func (x *Node) GetMetadata() map[string]*any.Any

func (*Node) GetPort

func (x *Node) GetPort() int32

func (*Node) GetWeight

func (x *Node) GetWeight() int32

func (*Node) ProtoMessage

func (*Node) ProtoMessage()

func (*Node) ProtoReflect

func (x *Node) ProtoReflect() protoreflect.Message

func (*Node) Reset

func (x *Node) Reset()

func (*Node) String

func (x *Node) String() string

func (*Node) Validate

func (m *Node) Validate() error

Validate checks the field values on Node with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

type NodeValidationError

type NodeValidationError struct {
	// contains filtered or unexported fields
}

NodeValidationError is the validation error returned by Node.Validate if the designated constraints aren't met.

func (NodeValidationError) Cause

func (e NodeValidationError) Cause() error

Cause function returns cause value.

func (NodeValidationError) Error

func (e NodeValidationError) Error() string

Error satisfies the builtin error interface

func (NodeValidationError) ErrorName

func (e NodeValidationError) ErrorName() string

ErrorName returns error name.

func (NodeValidationError) Field

func (e NodeValidationError) Field() string

Field function returns field value.

func (NodeValidationError) Key

func (e NodeValidationError) Key() bool

Key function returns key value.

func (NodeValidationError) Reason

func (e NodeValidationError) Reason() string

Reason function returns reason value.

type PassiveHealthCheck

type PassiveHealthCheck struct {

	// The health check probe type.
	Type      string                       `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"`
	Healthy   *PassiveHealthCheckHealthy   `protobuf:"bytes,2,opt,name=healthy,proto3" json:"healthy,omitempty"`
	Unhealthy *PassiveHealthCheckUnhealthy `protobuf:"bytes,3,opt,name=unhealthy,proto3" json:"unhealthy,omitempty"`
	// contains filtered or unexported fields
}

[#protodoc-title: Passive Health Check configuration]

func (*PassiveHealthCheck) Descriptor deprecated

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

Deprecated: Use PassiveHealthCheck.ProtoReflect.Descriptor instead.

func (*PassiveHealthCheck) GetHealthy

func (*PassiveHealthCheck) GetType

func (x *PassiveHealthCheck) GetType() string

func (*PassiveHealthCheck) GetUnhealthy

func (*PassiveHealthCheck) ProtoMessage

func (*PassiveHealthCheck) ProtoMessage()

func (*PassiveHealthCheck) ProtoReflect

func (x *PassiveHealthCheck) ProtoReflect() protoreflect.Message

func (*PassiveHealthCheck) Reset

func (x *PassiveHealthCheck) Reset()

func (*PassiveHealthCheck) String

func (x *PassiveHealthCheck) String() string

func (*PassiveHealthCheck) Validate

func (m *PassiveHealthCheck) Validate() error

Validate checks the field values on PassiveHealthCheck with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

type PassiveHealthCheckHealthy

type PassiveHealthCheckHealthy struct {

	// Probes with status codes in this array will be treated as healthy.
	HttpStatuses []int32 `protobuf:"varint,1,rep,packed,name=http_statuses,json=httpStatuses,proto3" json:"http_statuses,omitempty"`
	// How many consecutive success times should meet before a node is set to healthy.
	Successes int32 `protobuf:"varint,2,opt,name=successes,proto3" json:"successes,omitempty"`
	// contains filtered or unexported fields
}

[#protodoc-title: Passive Health Check configuration for judging nodes become healthy]

func (*PassiveHealthCheckHealthy) Descriptor deprecated

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

Deprecated: Use PassiveHealthCheckHealthy.ProtoReflect.Descriptor instead.

func (*PassiveHealthCheckHealthy) GetHttpStatuses

func (x *PassiveHealthCheckHealthy) GetHttpStatuses() []int32

func (*PassiveHealthCheckHealthy) GetSuccesses

func (x *PassiveHealthCheckHealthy) GetSuccesses() int32

func (*PassiveHealthCheckHealthy) ProtoMessage

func (*PassiveHealthCheckHealthy) ProtoMessage()

func (*PassiveHealthCheckHealthy) ProtoReflect

func (*PassiveHealthCheckHealthy) Reset

func (x *PassiveHealthCheckHealthy) Reset()

func (*PassiveHealthCheckHealthy) String

func (x *PassiveHealthCheckHealthy) String() string

func (*PassiveHealthCheckHealthy) Validate

func (m *PassiveHealthCheckHealthy) Validate() error

Validate checks the field values on PassiveHealthCheckHealthy with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

type PassiveHealthCheckHealthyValidationError

type PassiveHealthCheckHealthyValidationError struct {
	// contains filtered or unexported fields
}

PassiveHealthCheckHealthyValidationError is the validation error returned by PassiveHealthCheckHealthy.Validate if the designated constraints aren't met.

func (PassiveHealthCheckHealthyValidationError) Cause

Cause function returns cause value.

func (PassiveHealthCheckHealthyValidationError) Error

Error satisfies the builtin error interface

func (PassiveHealthCheckHealthyValidationError) ErrorName

ErrorName returns error name.

func (PassiveHealthCheckHealthyValidationError) Field

Field function returns field value.

func (PassiveHealthCheckHealthyValidationError) Key

Key function returns key value.

func (PassiveHealthCheckHealthyValidationError) Reason

Reason function returns reason value.

type PassiveHealthCheckUnhealthy

type PassiveHealthCheckUnhealthy struct {

	// Probes with status codes in this array will be treated as unhealthy.
	HttpStatuses []int32 `protobuf:"varint,1,rep,packed,name=http_statuses,json=httpStatuses,proto3" json:"http_statuses,omitempty"`
	// How many consecutive failures (http) occur should meet before a node is set to healthy.
	HttpFailures int32 `protobuf:"varint,2,opt,name=http_failures,json=httpFailures,proto3" json:"http_failures,omitempty"`
	// How many consecutive failures (tcp) occur should meet before a node is set to healthy.
	TcpFailures int32 `protobuf:"varint,3,opt,name=tcp_failures,json=tcpFailures,proto3" json:"tcp_failures,omitempty"`
	// How many consecutive timeouts occur should meet before a node is set to healthy.
	Timeouts int32 `protobuf:"varint,4,opt,name=timeouts,proto3" json:"timeouts,omitempty"`
	// contains filtered or unexported fields
}

[#protodoc-title: Passive Health Check configuration for judging nodes become unhealthy]

func (*PassiveHealthCheckUnhealthy) Descriptor deprecated

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

Deprecated: Use PassiveHealthCheckUnhealthy.ProtoReflect.Descriptor instead.

func (*PassiveHealthCheckUnhealthy) GetHttpFailures

func (x *PassiveHealthCheckUnhealthy) GetHttpFailures() int32

func (*PassiveHealthCheckUnhealthy) GetHttpStatuses

func (x *PassiveHealthCheckUnhealthy) GetHttpStatuses() []int32

func (*PassiveHealthCheckUnhealthy) GetTcpFailures

func (x *PassiveHealthCheckUnhealthy) GetTcpFailures() int32

func (*PassiveHealthCheckUnhealthy) GetTimeouts

func (x *PassiveHealthCheckUnhealthy) GetTimeouts() int32

func (*PassiveHealthCheckUnhealthy) ProtoMessage

func (*PassiveHealthCheckUnhealthy) ProtoMessage()

func (*PassiveHealthCheckUnhealthy) ProtoReflect

func (*PassiveHealthCheckUnhealthy) Reset

func (x *PassiveHealthCheckUnhealthy) Reset()

func (*PassiveHealthCheckUnhealthy) String

func (x *PassiveHealthCheckUnhealthy) String() string

func (*PassiveHealthCheckUnhealthy) Validate

func (m *PassiveHealthCheckUnhealthy) Validate() error

Validate checks the field values on PassiveHealthCheckUnhealthy with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

type PassiveHealthCheckUnhealthyValidationError

type PassiveHealthCheckUnhealthyValidationError struct {
	// contains filtered or unexported fields
}

PassiveHealthCheckUnhealthyValidationError is the validation error returned by PassiveHealthCheckUnhealthy.Validate if the designated constraints aren't met.

func (PassiveHealthCheckUnhealthyValidationError) Cause

Cause function returns cause value.

func (PassiveHealthCheckUnhealthyValidationError) Error

Error satisfies the builtin error interface

func (PassiveHealthCheckUnhealthyValidationError) ErrorName

ErrorName returns error name.

func (PassiveHealthCheckUnhealthyValidationError) Field

Field function returns field value.

func (PassiveHealthCheckUnhealthyValidationError) Key

Key function returns key value.

func (PassiveHealthCheckUnhealthyValidationError) Reason

Reason function returns reason value.

type PassiveHealthCheckValidationError

type PassiveHealthCheckValidationError struct {
	// contains filtered or unexported fields
}

PassiveHealthCheckValidationError is the validation error returned by PassiveHealthCheck.Validate if the designated constraints aren't met.

func (PassiveHealthCheckValidationError) Cause

Cause function returns cause value.

func (PassiveHealthCheckValidationError) Error

Error satisfies the builtin error interface

func (PassiveHealthCheckValidationError) ErrorName

ErrorName returns error name.

func (PassiveHealthCheckValidationError) Field

Field function returns field value.

func (PassiveHealthCheckValidationError) Key

Key function returns key value.

func (PassiveHealthCheckValidationError) Reason

Reason function returns reason value.

type Route

type Route struct {

	// URI array used to do the route match.
	// At least one item should be configured and each of them cannot be
	// duplicated.
	Uris []string `protobuf:"bytes,1,rep,name=uris,proto3" json:"uris,omitempty"`
	// The route name, it's useful for the logging but it's not required.
	Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	// The route id, can be an int64 value or a string matching the specific pattern.
	Id string `protobuf:"bytes,3,opt,name=id,proto3" json:"id,omitempty"`
	// Textual descriptions used to describe the route use.
	Desc string `protobuf:"bytes,4,opt,name=desc,proto3" json:"desc,omitempty"`
	// Priority of this route, used to decide which route should be used when
	// multiple routes contains same URI.
	// Larger value means higher priority. The default value is 0.
	Priority int32 `protobuf:"varint,5,opt,name=priority,proto3" json:"priority,omitempty"`
	// HTTP Methods used to do the route match.
	Methods []string `protobuf:"bytes,6,rep,name=methods,proto3" json:"methods,omitempty"`
	// Host array used to do the route match.
	Hosts []string `protobuf:"bytes,7,rep,name=hosts,proto3" json:"hosts,omitempty"`
	// Remote address array used to do the route match.
	RemoteAddrs []string `protobuf:"bytes,8,rep,name=remote_addrs,json=remoteAddrs,proto3" json:"remote_addrs,omitempty"`
	// Nginx vars used to do the route match.
	Vars []*Var `protobuf:"bytes,9,rep,name=vars,proto3" json:"vars,omitempty"`
	// Embedded plugins.
	Plugins *any.Any `protobuf:"bytes,10,opt,name=plugins,proto3" json:"plugins,omitempty"`
	// The referred service id.
	ServiceId string `protobuf:"bytes,11,opt,name=service_id,json=serviceId,proto3" json:"service_id,omitempty"`
	// The referred upstream id.
	UpstreamId string `protobuf:"bytes,12,opt,name=upstream_id,json=upstreamId,proto3" json:"upstream_id,omitempty"`
	// The route status.
	Status Route_RouteStatus `protobuf:"varint,13,opt,name=status,proto3,enum=Route_RouteStatus" json:"status,omitempty"`
	// contains filtered or unexported fields
}

[#protodoc-title: The Apache APISIX Route configuration] A Route contains multiple parts but basically can be grouped into three: 1). Route match, fields like uris, hosts, remote_addrs are the predicates to indicate whether a request can hit the route. 2). Route action, upstream_id specifies the backend upstream object, which guides Apache APISIX how to route request. 3). Plugins, plugins will run before/after the route action, some plugins are "terminated" so may be request will be returned on the APISIX side (like authentication failures). It's not totally equivalent to the jsonschema definition in Apache APISIX's code base since there are some historical considerations there which are not used here anymore.

func (*Route) Descriptor deprecated

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

Deprecated: Use Route.ProtoReflect.Descriptor instead.

func (*Route) GetDesc

func (x *Route) GetDesc() string

func (*Route) GetHosts

func (x *Route) GetHosts() []string

func (*Route) GetId

func (x *Route) GetId() string

func (*Route) GetMethods

func (x *Route) GetMethods() []string

func (*Route) GetName

func (x *Route) GetName() string

func (*Route) GetPlugins

func (x *Route) GetPlugins() *any.Any

func (*Route) GetPriority

func (x *Route) GetPriority() int32

func (*Route) GetRemoteAddrs

func (x *Route) GetRemoteAddrs() []string

func (*Route) GetServiceId

func (x *Route) GetServiceId() string

func (*Route) GetStatus

func (x *Route) GetStatus() Route_RouteStatus

func (*Route) GetUpstreamId

func (x *Route) GetUpstreamId() string

func (*Route) GetUris

func (x *Route) GetUris() []string

func (*Route) GetVars

func (x *Route) GetVars() []*Var

func (*Route) ProtoMessage

func (*Route) ProtoMessage()

func (*Route) ProtoReflect

func (x *Route) ProtoReflect() protoreflect.Message

func (*Route) Reset

func (x *Route) Reset()

func (*Route) String

func (x *Route) String() string

func (*Route) Validate

func (m *Route) Validate() error

Validate checks the field values on Route with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

type RouteValidationError

type RouteValidationError struct {
	// contains filtered or unexported fields
}

RouteValidationError is the validation error returned by Route.Validate if the designated constraints aren't met.

func (RouteValidationError) Cause

func (e RouteValidationError) Cause() error

Cause function returns cause value.

func (RouteValidationError) Error

func (e RouteValidationError) Error() string

Error satisfies the builtin error interface

func (RouteValidationError) ErrorName

func (e RouteValidationError) ErrorName() string

ErrorName returns error name.

func (RouteValidationError) Field

func (e RouteValidationError) Field() string

Field function returns field value.

func (RouteValidationError) Key

func (e RouteValidationError) Key() bool

Key function returns key value.

func (RouteValidationError) Reason

func (e RouteValidationError) Reason() string

Reason function returns reason value.

type Route_RouteStatus

type Route_RouteStatus int32

RouteStatus Enumerations.

const (
	Route_Disable Route_RouteStatus = 0
	Route_Enable  Route_RouteStatus = 1
)

func (Route_RouteStatus) Descriptor

func (Route_RouteStatus) Enum

func (Route_RouteStatus) EnumDescriptor deprecated

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

Deprecated: Use Route_RouteStatus.Descriptor instead.

func (Route_RouteStatus) Number

func (Route_RouteStatus) String

func (x Route_RouteStatus) String() string

func (Route_RouteStatus) Type

type Upstream

type Upstream struct {

	// How many times a request can be retried while communicating to the upstream,
	// note request can be retried only if no bytes are sent to client.
	Retries int32 `protobuf:"varint,1,opt,name=retries,proto3" json:"retries,omitempty"`
	// Timeout settings for this upstream.
	Timeout *Upstream_Timeout `protobuf:"bytes,2,opt,name=timeout,proto3" json:"timeout,omitempty"`
	// The load balancing algorithm.
	Type string `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"`
	// The scope of hash key, this field is only in effective
	// if type is "chash".
	HashOn string `protobuf:"bytes,4,opt,name=hash_on,json=hashOn,proto3" json:"hash_on,omitempty"`
	// The hash key, this field is only in effective
	// if type is "chash".
	Key string `protobuf:"bytes,5,opt,name=key,proto3" json:"key,omitempty"`
	// The health check settings for this upstream.
	Check *HealthCheck `protobuf:"bytes,6,opt,name=check,proto3" json:"check,omitempty"`
	// The communication protocol to use.
	Scheme string `protobuf:"bytes,7,opt,name=scheme,proto3" json:"scheme,omitempty"`
	// The host passing strategy.
	PassHost string `protobuf:"bytes,8,opt,name=pass_host,json=passHost,proto3" json:"pass_host,omitempty"`
	// The HTTP Host header to use when sending requests to this upstream.
	UpstreamHost string `protobuf:"bytes,9,opt,name=upstream_host,json=upstreamHost,proto3" json:"upstream_host,omitempty"`
	// The upstream name, it's useful for the logging but it's not required.
	Name string `protobuf:"bytes,10,opt,name=name,proto3" json:"name,omitempty"`
	// Textual descriptions used to describe the upstream use.
	Desc string `protobuf:"bytes,11,opt,name=desc,proto3" json:"desc,omitempty"`
	// The upstream id.
	Id string `protobuf:"bytes,12,opt,name=id,proto3" json:"id,omitempty"`
	// Upstream nodes.
	// @inject_tag: json:"nodes"
	Nodes []*Node `protobuf:"bytes,13,rep,name=nodes,proto3" json:"nodes"`
	// contains filtered or unexported fields
}

[#protodoc-title: The Apache APISIX Upstream configuration]

func (*Upstream) Descriptor deprecated

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

Deprecated: Use Upstream.ProtoReflect.Descriptor instead.

func (*Upstream) GetCheck

func (x *Upstream) GetCheck() *HealthCheck

func (*Upstream) GetDesc

func (x *Upstream) GetDesc() string

func (*Upstream) GetHashOn

func (x *Upstream) GetHashOn() string

func (*Upstream) GetId

func (x *Upstream) GetId() string

func (*Upstream) GetKey

func (x *Upstream) GetKey() string

func (*Upstream) GetName

func (x *Upstream) GetName() string

func (*Upstream) GetNodes

func (x *Upstream) GetNodes() []*Node

func (*Upstream) GetPassHost

func (x *Upstream) GetPassHost() string

func (*Upstream) GetRetries

func (x *Upstream) GetRetries() int32

func (*Upstream) GetScheme

func (x *Upstream) GetScheme() string

func (*Upstream) GetTimeout

func (x *Upstream) GetTimeout() *Upstream_Timeout

func (*Upstream) GetType

func (x *Upstream) GetType() string

func (*Upstream) GetUpstreamHost

func (x *Upstream) GetUpstreamHost() string

func (*Upstream) ProtoMessage

func (*Upstream) ProtoMessage()

func (*Upstream) ProtoReflect

func (x *Upstream) ProtoReflect() protoreflect.Message

func (*Upstream) Reset

func (x *Upstream) Reset()

func (*Upstream) String

func (x *Upstream) String() string

func (*Upstream) Validate

func (m *Upstream) Validate() error

Validate checks the field values on Upstream with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

type UpstreamValidationError

type UpstreamValidationError struct {
	// contains filtered or unexported fields
}

UpstreamValidationError is the validation error returned by Upstream.Validate if the designated constraints aren't met.

func (UpstreamValidationError) Cause

func (e UpstreamValidationError) Cause() error

Cause function returns cause value.

func (UpstreamValidationError) Error

func (e UpstreamValidationError) Error() string

Error satisfies the builtin error interface

func (UpstreamValidationError) ErrorName

func (e UpstreamValidationError) ErrorName() string

ErrorName returns error name.

func (UpstreamValidationError) Field

func (e UpstreamValidationError) Field() string

Field function returns field value.

func (UpstreamValidationError) Key

func (e UpstreamValidationError) Key() bool

Key function returns key value.

func (UpstreamValidationError) Reason

func (e UpstreamValidationError) Reason() string

Reason function returns reason value.

type Upstream_Timeout

type Upstream_Timeout struct {

	// The connect timeout setting (in seconds).
	Connect float64 `protobuf:"fixed64,1,opt,name=connect,proto3" json:"connect,omitempty"`
	// The send timeout setting (in seconds).
	Send float64 `protobuf:"fixed64,2,opt,name=send,proto3" json:"send,omitempty"`
	// The read timeout setting (in seconds).
	Read float64 `protobuf:"fixed64,3,opt,name=read,proto3" json:"read,omitempty"`
	// contains filtered or unexported fields
}

Timeout settings about connecting, reading and sending with upstream.

func (*Upstream_Timeout) Descriptor deprecated

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

Deprecated: Use Upstream_Timeout.ProtoReflect.Descriptor instead.

func (*Upstream_Timeout) GetConnect

func (x *Upstream_Timeout) GetConnect() float64

func (*Upstream_Timeout) GetRead

func (x *Upstream_Timeout) GetRead() float64

func (*Upstream_Timeout) GetSend

func (x *Upstream_Timeout) GetSend() float64

func (*Upstream_Timeout) ProtoMessage

func (*Upstream_Timeout) ProtoMessage()

func (*Upstream_Timeout) ProtoReflect

func (x *Upstream_Timeout) ProtoReflect() protoreflect.Message

func (*Upstream_Timeout) Reset

func (x *Upstream_Timeout) Reset()

func (*Upstream_Timeout) String

func (x *Upstream_Timeout) String() string

func (*Upstream_Timeout) Validate

func (m *Upstream_Timeout) Validate() error

Validate checks the field values on Upstream_Timeout with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

type Upstream_TimeoutValidationError

type Upstream_TimeoutValidationError struct {
	// contains filtered or unexported fields
}

Upstream_TimeoutValidationError is the validation error returned by Upstream_Timeout.Validate if the designated constraints aren't met.

func (Upstream_TimeoutValidationError) Cause

Cause function returns cause value.

func (Upstream_TimeoutValidationError) Error

Error satisfies the builtin error interface

func (Upstream_TimeoutValidationError) ErrorName

ErrorName returns error name.

func (Upstream_TimeoutValidationError) Field

Field function returns field value.

func (Upstream_TimeoutValidationError) Key

Key function returns key value.

func (Upstream_TimeoutValidationError) Reason

Reason function returns reason value.

type Var

type Var struct {

	// vars in Route is an two-dimensional array which cannot be represented
	// directly in protobuf, here we use https://github.com/favadi/protoc-go-inject-tag
	// to hack the ultimate pb.go.
	Vars []string `protobuf:"bytes,1,rep,name=vars,proto3" json:"vars,omitempty"`
	// contains filtered or unexported fields
}

Var represents the expression like: ["arg_id", "equal", "543"].

func (*Var) Descriptor deprecated

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

Deprecated: Use Var.ProtoReflect.Descriptor instead.

func (*Var) GetVars

func (x *Var) GetVars() []string

func (*Var) MarshalJSON

func (v *Var) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface.

func (*Var) ProtoMessage

func (*Var) ProtoMessage()

func (*Var) ProtoReflect

func (x *Var) ProtoReflect() protoreflect.Message

func (*Var) Reset

func (x *Var) Reset()

func (*Var) String

func (x *Var) String() string

func (*Var) Validate

func (m *Var) Validate() error

Validate checks the field values on Var with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

type VarValidationError

type VarValidationError struct {
	// contains filtered or unexported fields
}

VarValidationError is the validation error returned by Var.Validate if the designated constraints aren't met.

func (VarValidationError) Cause

func (e VarValidationError) Cause() error

Cause function returns cause value.

func (VarValidationError) Error

func (e VarValidationError) Error() string

Error satisfies the builtin error interface

func (VarValidationError) ErrorName

func (e VarValidationError) ErrorName() string

ErrorName returns error name.

func (VarValidationError) Field

func (e VarValidationError) Field() string

Field function returns field value.

func (VarValidationError) Key

func (e VarValidationError) Key() bool

Key function returns key value.

func (VarValidationError) Reason

func (e VarValidationError) Reason() string

Reason function returns reason value.

Jump to

Keyboard shortcuts

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