ratelimit

package
v1.6.28 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2021 License: Apache-2.0 Imports: 20 Imported by: 10

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_github_com_solo_io_gloo_projects_gloo_api_v1_enterprise_options_ratelimit_ratelimit_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type IngressRateLimit

type IngressRateLimit struct {
	AuthorizedLimits *v1alpha1.RateLimit `protobuf:"bytes,1,opt,name=authorized_limits,json=authorizedLimits,proto3" json:"authorized_limits,omitempty"`
	AnonymousLimits  *v1alpha1.RateLimit `protobuf:"bytes,2,opt,name=anonymous_limits,json=anonymousLimits,proto3" json:"anonymous_limits,omitempty"`
	// contains filtered or unexported fields
}

Basic rate-limiting API

func (*IngressRateLimit) Descriptor deprecated

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

Deprecated: Use IngressRateLimit.ProtoReflect.Descriptor instead.

func (*IngressRateLimit) Equal

func (m *IngressRateLimit) Equal(that interface{}) bool

Equal function

func (*IngressRateLimit) GetAnonymousLimits

func (x *IngressRateLimit) GetAnonymousLimits() *v1alpha1.RateLimit

func (*IngressRateLimit) GetAuthorizedLimits

func (x *IngressRateLimit) GetAuthorizedLimits() *v1alpha1.RateLimit

func (*IngressRateLimit) Hash added in v1.2.13

func (m *IngressRateLimit) Hash(hasher hash.Hash64) (uint64, error)

Hash function

func (*IngressRateLimit) ProtoMessage

func (*IngressRateLimit) ProtoMessage()

func (*IngressRateLimit) ProtoReflect added in v1.6.0

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

func (*IngressRateLimit) Reset

func (x *IngressRateLimit) Reset()

func (*IngressRateLimit) String

func (x *IngressRateLimit) String() string

type RateLimitConfigRef added in v1.5.0

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

A reference to a `RateLimitConfig` resource.

func (*RateLimitConfigRef) Descriptor deprecated added in v1.5.0

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

Deprecated: Use RateLimitConfigRef.ProtoReflect.Descriptor instead.

func (*RateLimitConfigRef) Equal added in v1.5.0

func (m *RateLimitConfigRef) Equal(that interface{}) bool

Equal function

func (*RateLimitConfigRef) GetName added in v1.5.0

func (x *RateLimitConfigRef) GetName() string

func (*RateLimitConfigRef) GetNamespace added in v1.5.0

func (x *RateLimitConfigRef) GetNamespace() string

func (*RateLimitConfigRef) Hash added in v1.5.0

func (m *RateLimitConfigRef) Hash(hasher hash.Hash64) (uint64, error)

Hash function

func (*RateLimitConfigRef) ProtoMessage added in v1.5.0

func (*RateLimitConfigRef) ProtoMessage()

func (*RateLimitConfigRef) ProtoReflect added in v1.6.0

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

func (*RateLimitConfigRef) Reset added in v1.5.0

func (x *RateLimitConfigRef) Reset()

func (*RateLimitConfigRef) String added in v1.5.0

func (x *RateLimitConfigRef) String() string

type RateLimitConfigRefs added in v1.5.0

type RateLimitConfigRefs struct {
	Refs []*RateLimitConfigRef `protobuf:"bytes,1,rep,name=refs,proto3" json:"refs,omitempty"`
	// contains filtered or unexported fields
}

A list of references to `RateLimitConfig` resources. Each resource represents a rate limit policy that will be independently enforced.

func (*RateLimitConfigRefs) Descriptor deprecated added in v1.5.0

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

Deprecated: Use RateLimitConfigRefs.ProtoReflect.Descriptor instead.

func (*RateLimitConfigRefs) Equal added in v1.5.0

func (m *RateLimitConfigRefs) Equal(that interface{}) bool

Equal function

func (*RateLimitConfigRefs) GetRefs added in v1.5.0

func (x *RateLimitConfigRefs) GetRefs() []*RateLimitConfigRef

func (*RateLimitConfigRefs) Hash added in v1.5.0

func (m *RateLimitConfigRefs) Hash(hasher hash.Hash64) (uint64, error)

Hash function

func (*RateLimitConfigRefs) ProtoMessage added in v1.5.0

func (*RateLimitConfigRefs) ProtoMessage()

func (*RateLimitConfigRefs) ProtoReflect added in v1.6.0

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

func (*RateLimitConfigRefs) Reset added in v1.5.0

func (x *RateLimitConfigRefs) Reset()

func (*RateLimitConfigRefs) String added in v1.5.0

func (x *RateLimitConfigRefs) String() string

type RateLimitRouteExtension

type RateLimitRouteExtension struct {

	// Whether or not to include rate limits as defined on the VirtualHost in addition to rate limits on the Route.
	IncludeVhRateLimits bool `protobuf:"varint,1,opt,name=include_vh_rate_limits,json=includeVhRateLimits,proto3" json:"include_vh_rate_limits,omitempty"`
	// Define individual rate limits here. Each rate limit will be evaluated, if any rate limit
	// would be throttled, the entire request returns a 429 (gets throttled)
	RateLimits []*v1alpha1.RateLimitActions `protobuf:"bytes,2,rep,name=rate_limits,json=rateLimits,proto3" json:"rate_limits,omitempty"`
	// contains filtered or unexported fields
}

Use this field if you want to inline the Envoy rate limits for this Route. Note that this does not configure the rate limit server. If you are running Gloo Enterprise, you need to specify the server configuration via the appropriate field in the Gloo `Settings` resource. If you are running a custom rate limit server you need to configure it yourself.

func (*RateLimitRouteExtension) Descriptor deprecated

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

Deprecated: Use RateLimitRouteExtension.ProtoReflect.Descriptor instead.

func (*RateLimitRouteExtension) Equal

func (m *RateLimitRouteExtension) Equal(that interface{}) bool

Equal function

func (*RateLimitRouteExtension) GetIncludeVhRateLimits

func (x *RateLimitRouteExtension) GetIncludeVhRateLimits() bool

func (*RateLimitRouteExtension) GetRateLimits

func (x *RateLimitRouteExtension) GetRateLimits() []*v1alpha1.RateLimitActions

func (*RateLimitRouteExtension) Hash added in v1.2.13

func (m *RateLimitRouteExtension) Hash(hasher hash.Hash64) (uint64, error)

Hash function

func (*RateLimitRouteExtension) ProtoMessage

func (*RateLimitRouteExtension) ProtoMessage()

func (*RateLimitRouteExtension) ProtoReflect added in v1.6.0

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

func (*RateLimitRouteExtension) Reset

func (x *RateLimitRouteExtension) Reset()

func (*RateLimitRouteExtension) String

func (x *RateLimitRouteExtension) String() string

type RateLimitVhostExtension

type RateLimitVhostExtension struct {

	// Define individual rate limits here. Each rate limit will be evaluated, if any rate limit
	// would be throttled, the entire request returns a 429 (gets throttled)
	RateLimits []*v1alpha1.RateLimitActions `protobuf:"bytes,1,rep,name=rate_limits,json=rateLimits,proto3" json:"rate_limits,omitempty"`
	// contains filtered or unexported fields
}

Use this field if you want to inline the Envoy rate limits for this VirtualHost. Note that this does not configure the rate limit server. If you are running Gloo Enterprise, you need to specify the server configuration via the appropriate field in the Gloo `Settings` resource. If you are running a custom rate limit server you need to configure it yourself.

func (*RateLimitVhostExtension) Descriptor deprecated

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

Deprecated: Use RateLimitVhostExtension.ProtoReflect.Descriptor instead.

func (*RateLimitVhostExtension) Equal

func (m *RateLimitVhostExtension) Equal(that interface{}) bool

Equal function

func (*RateLimitVhostExtension) GetRateLimits

func (x *RateLimitVhostExtension) GetRateLimits() []*v1alpha1.RateLimitActions

func (*RateLimitVhostExtension) Hash added in v1.2.13

func (m *RateLimitVhostExtension) Hash(hasher hash.Hash64) (uint64, error)

Hash function

func (*RateLimitVhostExtension) ProtoMessage

func (*RateLimitVhostExtension) ProtoMessage()

func (*RateLimitVhostExtension) ProtoReflect added in v1.6.0

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

func (*RateLimitVhostExtension) Reset

func (x *RateLimitVhostExtension) Reset()

func (*RateLimitVhostExtension) String

func (x *RateLimitVhostExtension) String() string

type ServiceSettings

type ServiceSettings struct {
	Descriptors    []*v1alpha1.Descriptor    `protobuf:"bytes,1,rep,name=descriptors,proto3" json:"descriptors,omitempty"`
	SetDescriptors []*v1alpha1.SetDescriptor `protobuf:"bytes,2,rep,name=set_descriptors,json=setDescriptors,proto3" json:"set_descriptors,omitempty"`
	// contains filtered or unexported fields
}

API based on Envoy's rate-limit service API. (reference here: https://github.com/lyft/ratelimit#configuration) Sample configuration below:

descriptors:

  • key: account_id descriptors:
  • key: plan value: BASIC rateLimit: requestsPerUnit: 1 unit: MINUTE
  • key: plan value: PLUS rateLimit: requestsPerUnit: 20 unit: MINUTE

func (*ServiceSettings) Descriptor deprecated

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

Deprecated: Use ServiceSettings.ProtoReflect.Descriptor instead.

func (*ServiceSettings) Equal

func (m *ServiceSettings) Equal(that interface{}) bool

Equal function

func (*ServiceSettings) GetDescriptors

func (x *ServiceSettings) GetDescriptors() []*v1alpha1.Descriptor

func (*ServiceSettings) GetSetDescriptors added in v1.6.0

func (x *ServiceSettings) GetSetDescriptors() []*v1alpha1.SetDescriptor

func (*ServiceSettings) Hash added in v1.2.13

func (m *ServiceSettings) Hash(hasher hash.Hash64) (uint64, error)

Hash function

func (*ServiceSettings) ProtoMessage

func (*ServiceSettings) ProtoMessage()

func (*ServiceSettings) ProtoReflect added in v1.6.0

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

func (*ServiceSettings) Reset

func (x *ServiceSettings) Reset()

func (*ServiceSettings) String

func (x *ServiceSettings) String() string

type Settings

type Settings struct {
	RatelimitServerRef *core.ResourceRef  `protobuf:"bytes,1,opt,name=ratelimit_server_ref,json=ratelimitServerRef,proto3" json:"ratelimit_server_ref,omitempty"`
	RequestTimeout     *duration.Duration `protobuf:"bytes,2,opt,name=request_timeout,json=requestTimeout,proto3" json:"request_timeout,omitempty"`
	DenyOnFail         bool               `protobuf:"varint,3,opt,name=deny_on_fail,json=denyOnFail,proto3" json:"deny_on_fail,omitempty"`
	// Set this is set to true if you would like to rate limit traffic before applying external auth to it.
	// *Note*: When this is true, you will lose some features like being able to rate limit a request based on its auth state
	RateLimitBeforeAuth bool `protobuf:"varint,9,opt,name=rate_limit_before_auth,json=rateLimitBeforeAuth,proto3" json:"rate_limit_before_auth,omitempty"`
	// contains filtered or unexported fields
}

func (*Settings) Descriptor deprecated

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

Deprecated: Use Settings.ProtoReflect.Descriptor instead.

func (*Settings) Equal

func (m *Settings) Equal(that interface{}) bool

Equal function

func (*Settings) GetDenyOnFail

func (x *Settings) GetDenyOnFail() bool

func (*Settings) GetRateLimitBeforeAuth

func (x *Settings) GetRateLimitBeforeAuth() bool

func (*Settings) GetRatelimitServerRef

func (x *Settings) GetRatelimitServerRef() *core.ResourceRef

func (*Settings) GetRequestTimeout

func (x *Settings) GetRequestTimeout() *duration.Duration

func (*Settings) Hash added in v1.2.13

func (m *Settings) Hash(hasher hash.Hash64) (uint64, error)

Hash function

func (*Settings) ProtoMessage

func (*Settings) ProtoMessage()

func (*Settings) ProtoReflect added in v1.6.0

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

func (*Settings) Reset

func (x *Settings) Reset()

func (*Settings) String

func (x *Settings) String() string

Jump to

Keyboard shortcuts

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