v1

package
v0.0.0-...-b5b7d89 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Protocol_name = map[int32]string{
		0: "UNSPECIFIED",
		1: "HTTP",
		2: "GRPC",
	}
	Protocol_value = map[string]int32{
		"UNSPECIFIED": 0,
		"HTTP":        1,
		"GRPC":        2,
	}
)

Enum value maps for Protocol.

View Source
var File_gateway_config_v1_gateway_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type Backend

type Backend struct {

	// localhost
	// 127.0.0.1:8000
	// discovery:///service_name
	Target      string       `protobuf:"bytes,1,opt,name=target,proto3" json:"target,omitempty"`
	Weight      *int64       `protobuf:"varint,2,opt,name=weight,proto3,oneof" json:"weight,omitempty"`
	HealthCheck *HealthCheck `protobuf:"bytes,3,opt,name=health_check,json=healthCheck,proto3" json:"health_check,omitempty"`
	// contains filtered or unexported fields
}

func (*Backend) Descriptor deprecated

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

Deprecated: Use Backend.ProtoReflect.Descriptor instead.

func (*Backend) GetHealthCheck

func (x *Backend) GetHealthCheck() *HealthCheck

func (*Backend) GetTarget

func (x *Backend) GetTarget() string

func (*Backend) GetWeight

func (x *Backend) GetWeight() int64

func (*Backend) ProtoMessage

func (*Backend) ProtoMessage()

func (*Backend) ProtoReflect

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

func (*Backend) Reset

func (x *Backend) Reset()

func (*Backend) String

func (x *Backend) String() string

type Condition

type Condition struct {

	// Types that are assignable to Condition:
	//
	//	*Condition_ByStatusCode
	//	*Condition_ByHeader
	Condition isCondition_Condition `protobuf_oneof:"condition"`
	// contains filtered or unexported fields
}

func (*Condition) Descriptor deprecated

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

Deprecated: Use Condition.ProtoReflect.Descriptor instead.

func (*Condition) GetByHeader

func (x *Condition) GetByHeader() *ConditionHeader

func (*Condition) GetByStatusCode

func (x *Condition) GetByStatusCode() string

func (*Condition) GetCondition

func (m *Condition) GetCondition() isCondition_Condition

func (*Condition) ProtoMessage

func (*Condition) ProtoMessage()

func (*Condition) ProtoReflect

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

func (*Condition) Reset

func (x *Condition) Reset()

func (*Condition) String

func (x *Condition) String() string

type ConditionHeader

type ConditionHeader struct {
	Name  string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
	// contains filtered or unexported fields
}

func (*ConditionHeader) Descriptor deprecated

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

Deprecated: Use ConditionHeader.ProtoReflect.Descriptor instead.

func (*ConditionHeader) GetName

func (x *ConditionHeader) GetName() string

func (*ConditionHeader) GetValue

func (x *ConditionHeader) GetValue() string

func (*ConditionHeader) ProtoMessage

func (*ConditionHeader) ProtoMessage()

func (*ConditionHeader) ProtoReflect

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

func (*ConditionHeader) Reset

func (x *ConditionHeader) Reset()

func (*ConditionHeader) String

func (x *ConditionHeader) String() string

type Condition_ByHeader

type Condition_ByHeader struct {
	// {"name": "grpc-status", "value": "14"}
	ByHeader *ConditionHeader `protobuf:"bytes,2,opt,name=by_header,json=byHeader,proto3,oneof"`
}

type Condition_ByStatusCode

type Condition_ByStatusCode struct {
	// "500-599", "429"
	ByStatusCode string `protobuf:"bytes,1,opt,name=by_status_code,json=byStatusCode,proto3,oneof"`
}

type Endpoint

type Endpoint struct {
	Path        string               `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"`
	Method      string               `protobuf:"bytes,2,opt,name=method,proto3" json:"method,omitempty"`
	Description string               `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`
	Protocol    Protocol             `protobuf:"varint,4,opt,name=protocol,proto3,enum=gateway.config.v1.Protocol" json:"protocol,omitempty"`
	Timeout     *durationpb.Duration `protobuf:"bytes,5,opt,name=timeout,proto3" json:"timeout,omitempty"`
	Middlewares []*Middleware        `protobuf:"bytes,6,rep,name=middlewares,proto3" json:"middlewares,omitempty"`
	Backends    []*Backend           `protobuf:"bytes,7,rep,name=backends,proto3" json:"backends,omitempty"`
	Retry       *Retry               `protobuf:"bytes,8,opt,name=retry,proto3" json:"retry,omitempty"`
	Metadata    map[string]string    `` /* 157-byte string literal not displayed */
	Host        string               `protobuf:"bytes,10,opt,name=host,proto3" json:"host,omitempty"`
	// contains filtered or unexported fields
}

func (*Endpoint) Descriptor deprecated

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

Deprecated: Use Endpoint.ProtoReflect.Descriptor instead.

func (*Endpoint) GetBackends

func (x *Endpoint) GetBackends() []*Backend

func (*Endpoint) GetDescription

func (x *Endpoint) GetDescription() string

func (*Endpoint) GetHost

func (x *Endpoint) GetHost() string

func (*Endpoint) GetMetadata

func (x *Endpoint) GetMetadata() map[string]string

func (*Endpoint) GetMethod

func (x *Endpoint) GetMethod() string

func (*Endpoint) GetMiddlewares

func (x *Endpoint) GetMiddlewares() []*Middleware

func (*Endpoint) GetPath

func (x *Endpoint) GetPath() string

func (*Endpoint) GetProtocol

func (x *Endpoint) GetProtocol() Protocol

func (*Endpoint) GetRetry

func (x *Endpoint) GetRetry() *Retry

func (*Endpoint) GetTimeout

func (x *Endpoint) GetTimeout() *durationpb.Duration

func (*Endpoint) ProtoMessage

func (*Endpoint) ProtoMessage()

func (*Endpoint) ProtoReflect

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

func (*Endpoint) Reset

func (x *Endpoint) Reset()

func (*Endpoint) String

func (x *Endpoint) String() string

type Gateway

type Gateway struct {
	Name    string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"`
	// Deprecated: Marked as deprecated in gateway/config/v1/gateway.proto.
	Hosts       []string      `protobuf:"bytes,3,rep,name=hosts,proto3" json:"hosts,omitempty"`
	Endpoints   []*Endpoint   `protobuf:"bytes,4,rep,name=endpoints,proto3" json:"endpoints,omitempty"`
	Middlewares []*Middleware `protobuf:"bytes,5,rep,name=middlewares,proto3" json:"middlewares,omitempty"`
	// contains filtered or unexported fields
}

func (*Gateway) Descriptor deprecated

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

Deprecated: Use Gateway.ProtoReflect.Descriptor instead.

func (*Gateway) GetEndpoints

func (x *Gateway) GetEndpoints() []*Endpoint

func (*Gateway) GetHosts deprecated

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

Deprecated: Marked as deprecated in gateway/config/v1/gateway.proto.

func (*Gateway) GetMiddlewares

func (x *Gateway) GetMiddlewares() []*Middleware

func (*Gateway) GetName

func (x *Gateway) GetName() string

func (*Gateway) GetVersion

func (x *Gateway) GetVersion() string

func (*Gateway) ProtoMessage

func (*Gateway) ProtoMessage()

func (*Gateway) ProtoReflect

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

func (*Gateway) Reset

func (x *Gateway) Reset()

func (*Gateway) String

func (x *Gateway) String() string

type HealthCheck

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

func (*HealthCheck) Descriptor deprecated

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

Deprecated: Use HealthCheck.ProtoReflect.Descriptor instead.

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

type Middleware

type Middleware struct {
	Name     string     `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Options  *anypb.Any `protobuf:"bytes,2,opt,name=options,proto3" json:"options,omitempty"`
	Required bool       `protobuf:"varint,3,opt,name=required,proto3" json:"required,omitempty"`
	// contains filtered or unexported fields
}

func (*Middleware) Descriptor deprecated

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

Deprecated: Use Middleware.ProtoReflect.Descriptor instead.

func (*Middleware) GetName

func (x *Middleware) GetName() string

func (*Middleware) GetOptions

func (x *Middleware) GetOptions() *anypb.Any

func (*Middleware) GetRequired

func (x *Middleware) GetRequired() bool

func (*Middleware) ProtoMessage

func (*Middleware) ProtoMessage()

func (*Middleware) ProtoReflect

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

func (*Middleware) Reset

func (x *Middleware) Reset()

func (*Middleware) String

func (x *Middleware) String() string

type PriorityConfig

type PriorityConfig struct {
	Name      string      `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Version   string      `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"`
	Endpoints []*Endpoint `protobuf:"bytes,3,rep,name=endpoints,proto3" json:"endpoints,omitempty"`
	// contains filtered or unexported fields
}

func (*PriorityConfig) Descriptor deprecated

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

Deprecated: Use PriorityConfig.ProtoReflect.Descriptor instead.

func (*PriorityConfig) GetEndpoints

func (x *PriorityConfig) GetEndpoints() []*Endpoint

func (*PriorityConfig) GetName

func (x *PriorityConfig) GetName() string

func (*PriorityConfig) GetVersion

func (x *PriorityConfig) GetVersion() string

func (*PriorityConfig) ProtoMessage

func (*PriorityConfig) ProtoMessage()

func (*PriorityConfig) ProtoReflect

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

func (*PriorityConfig) Reset

func (x *PriorityConfig) Reset()

func (*PriorityConfig) String

func (x *PriorityConfig) String() string

type Protocol

type Protocol int32
const (
	Protocol_UNSPECIFIED Protocol = 0
	Protocol_HTTP        Protocol = 1
	Protocol_GRPC        Protocol = 2
)

func (Protocol) Descriptor

func (Protocol) Descriptor() protoreflect.EnumDescriptor

func (Protocol) Enum

func (x Protocol) Enum() *Protocol

func (Protocol) EnumDescriptor deprecated

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

Deprecated: Use Protocol.Descriptor instead.

func (Protocol) Number

func (x Protocol) Number() protoreflect.EnumNumber

func (Protocol) String

func (x Protocol) String() string

func (Protocol) Type

type Retry

type Retry struct {

	// default attempts is 1
	Attempts      uint32               `protobuf:"varint,1,opt,name=attempts,proto3" json:"attempts,omitempty"`
	PerTryTimeout *durationpb.Duration `protobuf:"bytes,2,opt,name=per_try_timeout,json=perTryTimeout,proto3" json:"per_try_timeout,omitempty"`
	Conditions    []*Condition         `protobuf:"bytes,3,rep,name=conditions,proto3" json:"conditions,omitempty"`
	// primary,secondary
	Priorities []string `protobuf:"bytes,4,rep,name=priorities,proto3" json:"priorities,omitempty"`
	// contains filtered or unexported fields
}

func (*Retry) Descriptor deprecated

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

Deprecated: Use Retry.ProtoReflect.Descriptor instead.

func (*Retry) GetAttempts

func (x *Retry) GetAttempts() uint32

func (*Retry) GetConditions

func (x *Retry) GetConditions() []*Condition

func (*Retry) GetPerTryTimeout

func (x *Retry) GetPerTryTimeout() *durationpb.Duration

func (*Retry) GetPriorities

func (x *Retry) GetPriorities() []string

func (*Retry) ProtoMessage

func (*Retry) ProtoMessage()

func (*Retry) ProtoReflect

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

func (*Retry) Reset

func (x *Retry) Reset()

func (*Retry) String

func (x *Retry) String() string

Jump to

Keyboard shortcuts

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