api

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2021 License: MIT Imports: 11 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Route_LoadBalanceAlgo_name = map[int32]string{
		0: "RoundRobinWeighted",
		1: "RandomWeighted",
		2: "SmoothWeighted",
	}
	Route_LoadBalanceAlgo_value = map[string]int32{
		"RoundRobinWeighted": 0,
		"RandomWeighted":     1,
		"SmoothWeighted":     2,
	}
)

Enum value maps for Route_LoadBalanceAlgo.

View Source
var (
	Context_Protocol_name = map[int32]string{
		0: "TCP",
		1: "UDP",
		2: "HTTP",
		3: "WEBSOCKET",
		4: "QUIC",
	}
	Context_Protocol_value = map[string]int32{
		"TCP":       0,
		"UDP":       1,
		"HTTP":      2,
		"WEBSOCKET": 3,
		"QUIC":      4,
	}
)

Enum value maps for Context_Protocol.

View Source
var (
	Rule_HTTP_Method_name = map[int32]string{
		0: "GET",
		1: "POST",
		2: "PUT",
		3: "DELETE",
		4: "PATCH",
		5: "OPTIONS",
		6: "CONNECT",
		7: "HEAD",
		8: "TRACE",
		9: "ALL",
	}
	Rule_HTTP_Method_value = map[string]int32{
		"GET":     0,
		"POST":    1,
		"PUT":     2,
		"DELETE":  3,
		"PATCH":   4,
		"OPTIONS": 5,
		"CONNECT": 6,
		"HEAD":    7,
		"TRACE":   8,
		"ALL":     9,
	}
)

Enum value maps for Rule_HTTP_Method.

View Source
var Proxy_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "Proxy",
	HandlerType: (*ProxyServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Configure",
			Handler:    _Proxy_Configure_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "tcp.proto",
}

Proxy_ServiceDesc is the grpc.ServiceDesc for Proxy service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterProxyServer

func RegisterProxyServer(s grpc.ServiceRegistrar, srv ProxyServer)

Types

type Address

type Address struct {
	Network string `protobuf:"bytes,1,opt,name=network,proto3" json:"network,omitempty"`
	Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"`
	// contains filtered or unexported fields
}

func (*Address) Descriptor deprecated

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

Deprecated: Use Address.ProtoReflect.Descriptor instead.

func (*Address) GetAddress

func (x *Address) GetAddress() string

func (*Address) GetNetwork

func (x *Address) GetNetwork() string

func (*Address) ProtoMessage

func (*Address) ProtoMessage()

func (*Address) ProtoReflect

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

func (*Address) Reset

func (x *Address) Reset()

func (*Address) String

func (x *Address) String() string

type Config

type Config struct {
	Routes []*Route `protobuf:"bytes,1,rep,name=routes,proto3" json:"routes,omitempty"`
	// contains filtered or unexported fields
}

func (*Config) Descriptor deprecated

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

Deprecated: Use Config.ProtoReflect.Descriptor instead.

func (*Config) GetRoutes

func (x *Config) GetRoutes() []*Route

func (*Config) ProtoMessage

func (*Config) ProtoMessage()

func (*Config) ProtoReflect

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

func (*Config) Reset

func (x *Config) Reset()

func (*Config) String

func (x *Config) String() string

type Context

type Context struct {
	Id         int64            `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Protocol   Context_Protocol `protobuf:"varint,2,opt,name=protocol,proto3,enum=Context_Protocol" json:"protocol,omitempty"`
	Downstream *Context_Conn    `protobuf:"bytes,3,opt,name=downstream,proto3" json:"downstream,omitempty"`
	Upstream   *Context_Conn    `protobuf:"bytes,4,opt,name=upstream,proto3" json:"upstream,omitempty"`
	Info       *Context_Info    `protobuf:"bytes,5,opt,name=info,proto3" json:"info,omitempty"`
	// contains filtered or unexported fields
}

func (*Context) Descriptor deprecated

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

Deprecated: Use Context.ProtoReflect.Descriptor instead.

func (*Context) GetDownstream

func (x *Context) GetDownstream() *Context_Conn

func (*Context) GetId

func (x *Context) GetId() int64

func (*Context) GetInfo

func (x *Context) GetInfo() *Context_Info

func (*Context) GetProtocol

func (x *Context) GetProtocol() Context_Protocol

func (*Context) GetUpstream

func (x *Context) GetUpstream() *Context_Conn

func (*Context) ProtoMessage

func (*Context) ProtoMessage()

func (*Context) ProtoReflect

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

func (*Context) Reset

func (x *Context) Reset()

func (*Context) String

func (x *Context) String() string

type Context_Conn

type Context_Conn struct {
	LocalAddress  string        `protobuf:"bytes,1,opt,name=localAddress,proto3" json:"localAddress,omitempty"`
	RemoteAddress string        `protobuf:"bytes,2,opt,name=remoteAddress,proto3" json:"remoteAddress,omitempty"`
	Stat          *Context_Stat `protobuf:"bytes,3,opt,name=stat,proto3" json:"stat,omitempty"`
	// contains filtered or unexported fields
}

func (*Context_Conn) Descriptor deprecated

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

Deprecated: Use Context_Conn.ProtoReflect.Descriptor instead.

func (*Context_Conn) GetLocalAddress

func (x *Context_Conn) GetLocalAddress() string

func (*Context_Conn) GetRemoteAddress

func (x *Context_Conn) GetRemoteAddress() string

func (*Context_Conn) GetStat

func (x *Context_Conn) GetStat() *Context_Stat

func (*Context_Conn) ProtoMessage

func (*Context_Conn) ProtoMessage()

func (*Context_Conn) ProtoReflect

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

func (*Context_Conn) Reset

func (x *Context_Conn) Reset()

func (*Context_Conn) String

func (x *Context_Conn) String() string

type Context_Info

type Context_Info struct {
	Sni        *wrappers.StringValue `protobuf:"bytes,1,opt,name=sni,proto3" json:"sni,omitempty"`
	Host       *wrappers.StringValue `protobuf:"bytes,2,opt,name=host,proto3" json:"host,omitempty"`
	Path       *wrappers.StringValue `protobuf:"bytes,3,opt,name=path,proto3" json:"path,omitempty"`
	RouteName  string                `protobuf:"bytes,4,opt,name=routeName,proto3" json:"routeName,omitempty"`
	ListenPort int32                 `protobuf:"varint,5,opt,name=listenPort,proto3" json:"listenPort,omitempty"`
	// contains filtered or unexported fields
}

func (*Context_Info) Descriptor deprecated

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

Deprecated: Use Context_Info.ProtoReflect.Descriptor instead.

func (*Context_Info) GetHost

func (x *Context_Info) GetHost() *wrappers.StringValue

func (*Context_Info) GetListenPort

func (x *Context_Info) GetListenPort() int32

func (*Context_Info) GetPath

func (x *Context_Info) GetPath() *wrappers.StringValue

func (*Context_Info) GetRouteName

func (x *Context_Info) GetRouteName() string

func (*Context_Info) GetSni

func (x *Context_Info) GetSni() *wrappers.StringValue

func (*Context_Info) ProtoMessage

func (*Context_Info) ProtoMessage()

func (*Context_Info) ProtoReflect

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

func (*Context_Info) Reset

func (x *Context_Info) Reset()

func (*Context_Info) String

func (x *Context_Info) String() string

type Context_Protocol

type Context_Protocol int32
const (
	Context_TCP       Context_Protocol = 0
	Context_UDP       Context_Protocol = 1
	Context_HTTP      Context_Protocol = 2
	Context_WEBSOCKET Context_Protocol = 3
	Context_QUIC      Context_Protocol = 4
)

func (Context_Protocol) Descriptor

func (Context_Protocol) Enum

func (Context_Protocol) EnumDescriptor deprecated

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

Deprecated: Use Context_Protocol.Descriptor instead.

func (Context_Protocol) Number

func (Context_Protocol) String

func (x Context_Protocol) String() string

func (Context_Protocol) Type

type Context_Stat

type Context_Stat struct {
	BytesRead    int64 `protobuf:"varint,1,opt,name=bytesRead,proto3" json:"bytesRead,omitempty"`
	BytesWritten int64 `protobuf:"varint,2,opt,name=bytesWritten,proto3" json:"bytesWritten,omitempty"`
	// contains filtered or unexported fields
}

func (*Context_Stat) Descriptor deprecated

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

Deprecated: Use Context_Stat.ProtoReflect.Descriptor instead.

func (*Context_Stat) GetBytesRead

func (x *Context_Stat) GetBytesRead() int64

func (*Context_Stat) GetBytesWritten

func (x *Context_Stat) GetBytesWritten() int64

func (*Context_Stat) ProtoMessage

func (*Context_Stat) ProtoMessage()

func (*Context_Stat) ProtoReflect

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

func (*Context_Stat) Reset

func (x *Context_Stat) Reset()

func (*Context_Stat) String

func (x *Context_Stat) String() string

type Middleware

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

func (*Middleware) Descriptor deprecated

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

Deprecated: Use Middleware.ProtoReflect.Descriptor instead.

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 ProxyClient

type ProxyClient interface {
	Configure(ctx context.Context, in *Config, opts ...grpc.CallOption) (*Response, error)
}

ProxyClient is the client API for Proxy service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func NewProxyClient

func NewProxyClient(cc grpc.ClientConnInterface) ProxyClient

type ProxyServer

type ProxyServer interface {
	Configure(context.Context, *Config) (*Response, error)
	// contains filtered or unexported methods
}

ProxyServer is the server API for Proxy service. All implementations must embed UnimplementedProxyServer for forward compatibility

type RequestMatch

type RequestMatch struct {

	// Types that are assignable to Match:
	//	*RequestMatch_Sni
	//	*RequestMatch_Host
	//	*RequestMatch_Path
	//	*RequestMatch_Fixed
	Match isRequestMatch_Match `protobuf_oneof:"match"`
	// contains filtered or unexported fields
}

func (*RequestMatch) Descriptor deprecated

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

Deprecated: Use RequestMatch.ProtoReflect.Descriptor instead.

func (*RequestMatch) GetFixed

func (x *RequestMatch) GetFixed() *empty.Empty

func (*RequestMatch) GetHost

func (x *RequestMatch) GetHost() string

func (*RequestMatch) GetMatch

func (m *RequestMatch) GetMatch() isRequestMatch_Match

func (*RequestMatch) GetPath

func (x *RequestMatch) GetPath() string

func (*RequestMatch) GetSni

func (x *RequestMatch) GetSni() string

func (*RequestMatch) ProtoMessage

func (*RequestMatch) ProtoMessage()

func (*RequestMatch) ProtoReflect

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

func (*RequestMatch) Reset

func (x *RequestMatch) Reset()

func (*RequestMatch) String

func (x *RequestMatch) String() string

type RequestMatch_Fixed

type RequestMatch_Fixed struct {
	Fixed *empty.Empty `protobuf:"bytes,4,opt,name=fixed,proto3,oneof"`
}

type RequestMatch_Host

type RequestMatch_Host struct {
	Host string `protobuf:"bytes,2,opt,name=host,proto3,oneof"`
}

type RequestMatch_Path

type RequestMatch_Path struct {
	Path string `protobuf:"bytes,3,opt,name=path,proto3,oneof"`
}

type RequestMatch_Sni

type RequestMatch_Sni struct {
	Sni string `protobuf:"bytes,1,opt,name=sni,proto3,oneof"`
}

type Response

type Response struct {

	// Types that are assignable to Result:
	//	*Response_Ok
	//	*Response_Error
	Result isResponse_Result `protobuf_oneof:"result"`
	// contains filtered or unexported fields
}

func (*Response) Descriptor deprecated

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

Deprecated: Use Response.ProtoReflect.Descriptor instead.

func (*Response) GetError

func (x *Response) GetError() string

func (*Response) GetOk

func (x *Response) GetOk() bool

func (*Response) GetResult

func (m *Response) GetResult() isResponse_Result

func (*Response) ProtoMessage

func (*Response) ProtoMessage()

func (*Response) ProtoReflect

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

func (*Response) Reset

func (x *Response) Reset()

func (*Response) String

func (x *Response) String() string

type Response_Error

type Response_Error struct {
	Error string `protobuf:"bytes,2,opt,name=error,proto3,oneof"`
}

type Response_Ok

type Response_Ok struct {
	Ok bool `protobuf:"varint,1,opt,name=ok,proto3,oneof"`
}

type Retries

type Retries struct {
	Enabled bool         `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"`
	Budget  *RetryBudget `protobuf:"bytes,2,opt,name=budget,proto3" json:"budget,omitempty"`
	// contains filtered or unexported fields
}

func (*Retries) Descriptor deprecated

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

Deprecated: Use Retries.ProtoReflect.Descriptor instead.

func (*Retries) GetBudget

func (x *Retries) GetBudget() *RetryBudget

func (*Retries) GetEnabled

func (x *Retries) GetEnabled() bool

func (*Retries) ProtoMessage

func (*Retries) ProtoMessage()

func (*Retries) ProtoReflect

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

func (*Retries) Reset

func (x *Retries) Reset()

func (*Retries) String

func (x *Retries) String() string

type RetryBudget

type RetryBudget struct {

	// The ratio of additional traffic that may be added by retries.  A
	// retry_ratio of 0.1 means that 1 retry may be attempted for every 10 regular
	// requests.  A retry_ratio of 1.0 means that 1 retry may be attempted for
	// every 1 regular request (in other words, total request load may be doubled
	// as a result of retries).
	RetryRatio float32 `protobuf:"fixed32,1,opt,name=retry_ratio,json=retryRatio,proto3" json:"retry_ratio,omitempty"`
	// The proxy may always attempt this number of retries per second, even if it
	// would violate the retry_ratio.  This is to allow retries to happen even
	// when the request rate is very low.
	MinRetriesPerSecond uint32 `protobuf:"varint,2,opt,name=min_retries_per_second,json=minRetriesPerSecond,proto3" json:"min_retries_per_second,omitempty"`
	// This duration indicates for how long requests should be considered for the
	// purposes of enforcing the retry_ratio.  A higher value considers a larger
	// window and therefore allows burstier retries.
	Ttl *duration.Duration `protobuf:"bytes,3,opt,name=ttl,proto3" json:"ttl,omitempty"`
	// contains filtered or unexported fields
}

func (*RetryBudget) Descriptor deprecated

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

Deprecated: Use RetryBudget.ProtoReflect.Descriptor instead.

func (*RetryBudget) GetMinRetriesPerSecond

func (x *RetryBudget) GetMinRetriesPerSecond() uint32

func (*RetryBudget) GetRetryRatio

func (x *RetryBudget) GetRetryRatio() float32

func (*RetryBudget) GetTtl

func (x *RetryBudget) GetTtl() *duration.Duration

func (*RetryBudget) ProtoMessage

func (*RetryBudget) ProtoMessage()

func (*RetryBudget) ProtoReflect

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

func (*RetryBudget) Reset

func (x *RetryBudget) Reset()

func (*RetryBudget) String

func (x *RetryBudget) String() string

type Route

type Route struct {
	Src                 *Address              `protobuf:"bytes,1,opt,name=src,proto3" json:"src,omitempty"`
	Condition           *RequestMatch         `protobuf:"bytes,2,opt,name=condition,proto3" json:"condition,omitempty"`
	MetricsLabels       map[string]string     `` /* 188-byte string literal not displayed */
	Retries             *Retries              `protobuf:"bytes,4,opt,name=retries,proto3" json:"retries,omitempty"`
	Timeout             *duration.Duration    `protobuf:"bytes,5,opt,name=timeout,proto3" json:"timeout,omitempty"`
	KeepAlive           *duration.Duration    `protobuf:"bytes,6,opt,name=keepAlive,proto3" json:"keepAlive,omitempty"`
	Endpoint            *WeightedAddr         `protobuf:"bytes,7,opt,name=endpoint,proto3" json:"endpoint,omitempty"`
	LoadBalance         []*WeightedAddr       `protobuf:"bytes,8,rep,name=load_balance,json=loadBalance,proto3" json:"load_balance,omitempty"`
	LoadBalanceAlgo     Route_LoadBalanceAlgo `` /* 136-byte string literal not displayed */
	AllowAcme           bool                  `protobuf:"varint,10,opt,name=allow_acme,json=allowAcme,proto3" json:"allow_acme,omitempty"`
	EnableOptimizedCopy bool                  `protobuf:"varint,11,opt,name=enable_optimized_copy,json=enableOptimizedCopy,proto3" json:"enable_optimized_copy,omitempty"`
	Speed               *Speed                `protobuf:"bytes,12,opt,name=speed,proto3" json:"speed,omitempty"`
	Name                string                `protobuf:"bytes,13,opt,name=name,proto3" json:"name,omitempty"`
	Rule                *Rule                 `protobuf:"bytes,14,opt,name=rule,proto3" json:"rule,omitempty"`
	Priority            int32                 `protobuf:"varint,15,opt,name=priority,proto3" json:"priority,omitempty"`
	Middlewares         []*Middleware         `protobuf:"bytes,16,rep,name=middlewares,proto3" json:"middlewares,omitempty"`
	// contains filtered or unexported fields
}

func (*Route) Descriptor deprecated

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

Deprecated: Use Route.ProtoReflect.Descriptor instead.

func (*Route) GetAllowAcme

func (x *Route) GetAllowAcme() bool

func (*Route) GetCondition

func (x *Route) GetCondition() *RequestMatch

func (*Route) GetEnableOptimizedCopy

func (x *Route) GetEnableOptimizedCopy() bool

func (*Route) GetEndpoint

func (x *Route) GetEndpoint() *WeightedAddr

func (*Route) GetKeepAlive

func (x *Route) GetKeepAlive() *duration.Duration

func (*Route) GetLoadBalance

func (x *Route) GetLoadBalance() []*WeightedAddr

func (*Route) GetLoadBalanceAlgo

func (x *Route) GetLoadBalanceAlgo() Route_LoadBalanceAlgo

func (*Route) GetMetricsLabels

func (x *Route) GetMetricsLabels() map[string]string

func (*Route) GetMiddlewares

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

func (*Route) GetName

func (x *Route) GetName() string

func (*Route) GetPriority

func (x *Route) GetPriority() int32

func (*Route) GetRetries

func (x *Route) GetRetries() *Retries

func (*Route) GetRule

func (x *Route) GetRule() *Rule

func (*Route) GetSpeed

func (x *Route) GetSpeed() *Speed

func (*Route) GetSrc

func (x *Route) GetSrc() *Address

func (*Route) GetTimeout

func (x *Route) GetTimeout() *duration.Duration

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

type Route_LoadBalanceAlgo

type Route_LoadBalanceAlgo int32
const (
	Route_RoundRobinWeighted Route_LoadBalanceAlgo = 0
	Route_RandomWeighted     Route_LoadBalanceAlgo = 1
	Route_SmoothWeighted     Route_LoadBalanceAlgo = 2
)

func (Route_LoadBalanceAlgo) Descriptor

func (Route_LoadBalanceAlgo) Enum

func (Route_LoadBalanceAlgo) EnumDescriptor deprecated

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

Deprecated: Use Route_LoadBalanceAlgo.Descriptor instead.

func (Route_LoadBalanceAlgo) Number

func (Route_LoadBalanceAlgo) String

func (x Route_LoadBalanceAlgo) String() string

func (Route_LoadBalanceAlgo) Type

type Rule

type Rule struct {

	// Types that are assignable to Match:
	//	*Rule_All
	//	*Rule_Any
	//	*Rule_Not
	//	*Rule_Tcp
	//	*Rule_Http
	Match isRule_Match `protobuf_oneof:"match"`
	// contains filtered or unexported fields
}

func (*Rule) Descriptor deprecated

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

Deprecated: Use Rule.ProtoReflect.Descriptor instead.

func (*Rule) GetAll

func (x *Rule) GetAll() *Rule_List

func (*Rule) GetAny

func (x *Rule) GetAny() *Rule_List

func (*Rule) GetHttp

func (x *Rule) GetHttp() *Rule_HTTP

func (*Rule) GetMatch

func (m *Rule) GetMatch() isRule_Match

func (*Rule) GetNot

func (x *Rule) GetNot() *Rule

func (*Rule) GetTcp

func (x *Rule) GetTcp() *Rule_TCP

func (*Rule) ProtoMessage

func (*Rule) ProtoMessage()

func (*Rule) ProtoReflect

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

func (*Rule) Reset

func (x *Rule) Reset()

func (*Rule) String

func (x *Rule) String() string

type Rule_All

type Rule_All struct {
	All *Rule_List `protobuf:"bytes,1,opt,name=all,proto3,oneof"`
}

type Rule_Any

type Rule_Any struct {
	Any *Rule_List `protobuf:"bytes,2,opt,name=any,proto3,oneof"`
}

type Rule_HTTP

type Rule_HTTP struct {

	// Types that are assignable to Match:
	//	*Rule_HTTP_Methods_
	//	*Rule_HTTP_Path
	//	*Rule_HTTP_Host
	//	*Rule_HTTP_Headers_
	Match isRule_HTTP_Match `protobuf_oneof:"match"`
	// contains filtered or unexported fields
}

func (*Rule_HTTP) Descriptor deprecated

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

Deprecated: Use Rule_HTTP.ProtoReflect.Descriptor instead.

func (*Rule_HTTP) GetHeaders

func (x *Rule_HTTP) GetHeaders() *Rule_HTTP_Headers

func (*Rule_HTTP) GetHost

func (x *Rule_HTTP) GetHost() string

func (*Rule_HTTP) GetMatch

func (m *Rule_HTTP) GetMatch() isRule_HTTP_Match

func (*Rule_HTTP) GetMethods

func (x *Rule_HTTP) GetMethods() *Rule_HTTP_Methods

func (*Rule_HTTP) GetPath

func (x *Rule_HTTP) GetPath() *Rule_StringMatch

func (*Rule_HTTP) ProtoMessage

func (*Rule_HTTP) ProtoMessage()

func (*Rule_HTTP) ProtoReflect

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

func (*Rule_HTTP) Reset

func (x *Rule_HTTP) Reset()

func (*Rule_HTTP) String

func (x *Rule_HTTP) String() string

type Rule_HTTP_Headers

type Rule_HTTP_Headers struct {
	Headers []*Rule_Header `protobuf:"bytes,1,rep,name=headers,proto3" json:"headers,omitempty"`
	// contains filtered or unexported fields
}

func (*Rule_HTTP_Headers) Descriptor deprecated

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

Deprecated: Use Rule_HTTP_Headers.ProtoReflect.Descriptor instead.

func (*Rule_HTTP_Headers) GetHeaders

func (x *Rule_HTTP_Headers) GetHeaders() []*Rule_Header

func (*Rule_HTTP_Headers) ProtoMessage

func (*Rule_HTTP_Headers) ProtoMessage()

func (*Rule_HTTP_Headers) ProtoReflect

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

func (*Rule_HTTP_Headers) Reset

func (x *Rule_HTTP_Headers) Reset()

func (*Rule_HTTP_Headers) String

func (x *Rule_HTTP_Headers) String() string

type Rule_HTTP_Headers_

type Rule_HTTP_Headers_ struct {
	Headers *Rule_HTTP_Headers `protobuf:"bytes,4,opt,name=headers,proto3,oneof"`
}

type Rule_HTTP_Host

type Rule_HTTP_Host struct {
	Host string `protobuf:"bytes,3,opt,name=host,proto3,oneof"`
}

type Rule_HTTP_Method

type Rule_HTTP_Method int32
const (
	Rule_HTTP_GET     Rule_HTTP_Method = 0
	Rule_HTTP_POST    Rule_HTTP_Method = 1
	Rule_HTTP_PUT     Rule_HTTP_Method = 2
	Rule_HTTP_DELETE  Rule_HTTP_Method = 3
	Rule_HTTP_PATCH   Rule_HTTP_Method = 4
	Rule_HTTP_OPTIONS Rule_HTTP_Method = 5
	Rule_HTTP_CONNECT Rule_HTTP_Method = 6
	Rule_HTTP_HEAD    Rule_HTTP_Method = 7
	Rule_HTTP_TRACE   Rule_HTTP_Method = 8
	Rule_HTTP_ALL     Rule_HTTP_Method = 9
)

func (Rule_HTTP_Method) Descriptor

func (Rule_HTTP_Method) Enum

func (Rule_HTTP_Method) EnumDescriptor deprecated

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

Deprecated: Use Rule_HTTP_Method.Descriptor instead.

func (Rule_HTTP_Method) Number

func (Rule_HTTP_Method) String

func (x Rule_HTTP_Method) String() string

func (Rule_HTTP_Method) Type

type Rule_HTTP_Methods

type Rule_HTTP_Methods struct {
	Methods []Rule_HTTP_Method `protobuf:"varint,1,rep,packed,name=methods,proto3,enum=Rule_HTTP_Method" json:"methods,omitempty"`
	// contains filtered or unexported fields
}

func (*Rule_HTTP_Methods) Descriptor deprecated

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

Deprecated: Use Rule_HTTP_Methods.ProtoReflect.Descriptor instead.

func (*Rule_HTTP_Methods) GetMethods

func (x *Rule_HTTP_Methods) GetMethods() []Rule_HTTP_Method

func (*Rule_HTTP_Methods) ProtoMessage

func (*Rule_HTTP_Methods) ProtoMessage()

func (*Rule_HTTP_Methods) ProtoReflect

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

func (*Rule_HTTP_Methods) Reset

func (x *Rule_HTTP_Methods) Reset()

func (*Rule_HTTP_Methods) String

func (x *Rule_HTTP_Methods) String() string

type Rule_HTTP_Methods_

type Rule_HTTP_Methods_ struct {
	Methods *Rule_HTTP_Methods `protobuf:"bytes,1,opt,name=methods,proto3,oneof"`
}

type Rule_HTTP_Path

type Rule_HTTP_Path struct {
	Path *Rule_StringMatch `protobuf:"bytes,2,opt,name=path,proto3,oneof"`
}

type Rule_Header

type Rule_Header struct {
	Key    string            `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	Vallue *Rule_StringMatch `protobuf:"bytes,2,opt,name=vallue,proto3" json:"vallue,omitempty"`
	// contains filtered or unexported fields
}

func (*Rule_Header) Descriptor deprecated

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

Deprecated: Use Rule_Header.ProtoReflect.Descriptor instead.

func (*Rule_Header) GetKey

func (x *Rule_Header) GetKey() string

func (*Rule_Header) GetVallue

func (x *Rule_Header) GetVallue() *Rule_StringMatch

func (*Rule_Header) ProtoMessage

func (*Rule_Header) ProtoMessage()

func (*Rule_Header) ProtoReflect

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

func (*Rule_Header) Reset

func (x *Rule_Header) Reset()

func (*Rule_Header) String

func (x *Rule_Header) String() string

type Rule_Http

type Rule_Http struct {
	Http *Rule_HTTP `protobuf:"bytes,5,opt,name=http,proto3,oneof"`
}

type Rule_List

type Rule_List struct {
	Rules []*Rule `protobuf:"bytes,1,rep,name=rules,proto3" json:"rules,omitempty"`
	// contains filtered or unexported fields
}

func (*Rule_List) Descriptor deprecated

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

Deprecated: Use Rule_List.ProtoReflect.Descriptor instead.

func (*Rule_List) GetRules

func (x *Rule_List) GetRules() []*Rule

func (*Rule_List) ProtoMessage

func (*Rule_List) ProtoMessage()

func (*Rule_List) ProtoReflect

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

func (*Rule_List) Reset

func (x *Rule_List) Reset()

func (*Rule_List) String

func (x *Rule_List) String() string

type Rule_Not

type Rule_Not struct {
	Not *Rule `protobuf:"bytes,3,opt,name=not,proto3,oneof"`
}

type Rule_StringMatch

type Rule_StringMatch struct {

	// Types that are assignable to Match:
	//	*Rule_StringMatch_Exact
	//	*Rule_StringMatch_Prefix
	//	*Rule_StringMatch_Regexp
	Match isRule_StringMatch_Match `protobuf_oneof:"match"`
	// contains filtered or unexported fields
}

func (*Rule_StringMatch) Descriptor deprecated

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

Deprecated: Use Rule_StringMatch.ProtoReflect.Descriptor instead.

func (*Rule_StringMatch) GetExact

func (x *Rule_StringMatch) GetExact() string

func (*Rule_StringMatch) GetMatch

func (m *Rule_StringMatch) GetMatch() isRule_StringMatch_Match

func (*Rule_StringMatch) GetPrefix

func (x *Rule_StringMatch) GetPrefix() string

func (*Rule_StringMatch) GetRegexp

func (x *Rule_StringMatch) GetRegexp() string

func (*Rule_StringMatch) ProtoMessage

func (*Rule_StringMatch) ProtoMessage()

func (*Rule_StringMatch) ProtoReflect

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

func (*Rule_StringMatch) Reset

func (x *Rule_StringMatch) Reset()

func (*Rule_StringMatch) String

func (x *Rule_StringMatch) String() string

type Rule_StringMatch_Exact

type Rule_StringMatch_Exact struct {
	Exact string `protobuf:"bytes,1,opt,name=exact,proto3,oneof"`
}

type Rule_StringMatch_Prefix

type Rule_StringMatch_Prefix struct {
	Prefix string `protobuf:"bytes,2,opt,name=prefix,proto3,oneof"`
}

type Rule_StringMatch_Regexp

type Rule_StringMatch_Regexp struct {
	Regexp string `protobuf:"bytes,3,opt,name=regexp,proto3,oneof"`
}

type Rule_TCP

type Rule_TCP struct {

	// Types that are assignable to Match:
	//	*Rule_TCP_Port
	//	*Rule_TCP_Ports
	//	*Rule_TCP_Sni
	Match isRule_TCP_Match `protobuf_oneof:"match"`
	// contains filtered or unexported fields
}

func (*Rule_TCP) Descriptor deprecated

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

Deprecated: Use Rule_TCP.ProtoReflect.Descriptor instead.

func (*Rule_TCP) GetMatch

func (m *Rule_TCP) GetMatch() isRule_TCP_Match

func (*Rule_TCP) GetPort

func (x *Rule_TCP) GetPort() uint32

func (*Rule_TCP) GetPorts

func (x *Rule_TCP) GetPorts() *Rule_TCP_PortRange

func (*Rule_TCP) GetSni

func (x *Rule_TCP) GetSni() string

func (*Rule_TCP) ProtoMessage

func (*Rule_TCP) ProtoMessage()

func (*Rule_TCP) ProtoReflect

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

func (*Rule_TCP) Reset

func (x *Rule_TCP) Reset()

func (*Rule_TCP) String

func (x *Rule_TCP) String() string

type Rule_TCP_Port

type Rule_TCP_Port struct {
	Port uint32 `protobuf:"varint,1,opt,name=port,proto3,oneof"`
}

type Rule_TCP_PortRange

type Rule_TCP_PortRange struct {
	Min uint32 `protobuf:"varint,1,opt,name=min,proto3" json:"min,omitempty"`
	Max uint32 `protobuf:"varint,2,opt,name=max,proto3" json:"max,omitempty"`
	// contains filtered or unexported fields
}

func (*Rule_TCP_PortRange) Descriptor deprecated

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

Deprecated: Use Rule_TCP_PortRange.ProtoReflect.Descriptor instead.

func (*Rule_TCP_PortRange) GetMax

func (x *Rule_TCP_PortRange) GetMax() uint32

func (*Rule_TCP_PortRange) GetMin

func (x *Rule_TCP_PortRange) GetMin() uint32

func (*Rule_TCP_PortRange) ProtoMessage

func (*Rule_TCP_PortRange) ProtoMessage()

func (*Rule_TCP_PortRange) ProtoReflect

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

func (*Rule_TCP_PortRange) Reset

func (x *Rule_TCP_PortRange) Reset()

func (*Rule_TCP_PortRange) String

func (x *Rule_TCP_PortRange) String() string

type Rule_TCP_Ports

type Rule_TCP_Ports struct {
	Ports *Rule_TCP_PortRange `protobuf:"bytes,2,opt,name=ports,proto3,oneof"`
}

type Rule_TCP_Sni

type Rule_TCP_Sni struct {
	Sni string `protobuf:"bytes,3,opt,name=sni,proto3,oneof"`
}

type Rule_Tcp

type Rule_Tcp struct {
	Tcp *Rule_TCP `protobuf:"bytes,4,opt,name=tcp,proto3,oneof"`
}

type Speed

type Speed struct {

	// The rate at which bytes are written to downstream connection. By downstream
	// connection we are refering to a connection established on tt server by the
	// world
	//   World => tt => Internal
	//   World [==> downstream connection] tt => Internal
	Downstream string `protobuf:"bytes,1,opt,name=downstream,proto3" json:"downstream,omitempty"`
	// The rate at which bytes are written to upstream connection. By upstream
	// connection we are refering to a connection established by tt server to the
	// configured internal service.
	//   World => tt => Internal
	//   World => tt [=> upstream connection] Internal
	Upstream string `protobuf:"bytes,2,opt,name=upstream,proto3" json:"upstream,omitempty"`
	// contains filtered or unexported fields
}

Speed defines rate limiting of how fast data willl be copied. This is a described in bytes units "B", "KiB", "MiB", "GiB", "TiB", "PiB", "EiB", "ZiB", "YiB"

I you want do have upload speed of up to 40 mp per seconds then you can set downstream="20MiB/s"

func (*Speed) Descriptor deprecated

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

Deprecated: Use Speed.ProtoReflect.Descriptor instead.

func (*Speed) GetDownstream

func (x *Speed) GetDownstream() string

func (*Speed) GetUpstream

func (x *Speed) GetUpstream() string

func (*Speed) ProtoMessage

func (*Speed) ProtoMessage()

func (*Speed) ProtoReflect

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

func (*Speed) Reset

func (x *Speed) Reset()

func (*Speed) String

func (x *Speed) String() string

type UnimplementedProxyServer

type UnimplementedProxyServer struct {
}

UnimplementedProxyServer must be embedded to have forward compatible implementations.

func (UnimplementedProxyServer) Configure

type UnsafeProxyServer

type UnsafeProxyServer interface {
	// contains filtered or unexported methods
}

UnsafeProxyServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ProxyServer will result in compilation errors.

type WeightedAddr

type WeightedAddr struct {
	Addr         *Address          `protobuf:"bytes,1,opt,name=addr,proto3" json:"addr,omitempty"`
	Weight       int32             `protobuf:"varint,3,opt,name=weight,proto3" json:"weight,omitempty"`
	MetricLabels map[string]string `` /* 185-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*WeightedAddr) Descriptor deprecated

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

Deprecated: Use WeightedAddr.ProtoReflect.Descriptor instead.

func (*WeightedAddr) GetAddr

func (x *WeightedAddr) GetAddr() *Address

func (*WeightedAddr) GetMetricLabels

func (x *WeightedAddr) GetMetricLabels() map[string]string

func (*WeightedAddr) GetWeight

func (x *WeightedAddr) GetWeight() int32

func (*WeightedAddr) ProtoMessage

func (*WeightedAddr) ProtoMessage()

func (*WeightedAddr) ProtoReflect

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

func (*WeightedAddr) Reset

func (x *WeightedAddr) Reset()

func (*WeightedAddr) String

func (x *WeightedAddr) String() string

Jump to

Keyboard shortcuts

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