rate_limit_quotav3

package
v0.0.0-...-5360bea Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2023 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_envoy_service_rate_limit_quota_v3_rlqs_proto protoreflect.FileDescriptor

Functions

func RegisterRateLimitQuotaServiceServer

func RegisterRateLimitQuotaServiceServer(s *grpc.Server, srv RateLimitQuotaServiceServer)

Types

type BucketId

type BucketId struct {
	Bucket map[string]string `` /* 153-byte string literal not displayed */
	// contains filtered or unexported fields
}

The identifier for the bucket. Used to match the bucket between the control plane (RLQS server), and the data plane (RLQS client), f.e.:

  • the data plane sends a usage report for requests matched into the bucket with “BucketId“ to the control plane
  • the control plane sends an assignment for the bucket with “BucketId“ to the data plane Bucket ID.

Example:

.. validated-code-block:: yaml

:type-name: envoy.service.rate_limit_quota.v3.BucketId

bucket:
  name: my_bucket
  env: staging

.. note::

The order of ``BucketId`` keys do not matter. Buckets ``{ a: 'A', b: 'B' }`` and
``{ b: 'B', a: 'A' }`` are identical.

func (*BucketId) Descriptor deprecated

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

Deprecated: Use BucketId.ProtoReflect.Descriptor instead.

func (*BucketId) GetBucket

func (x *BucketId) GetBucket() map[string]string

func (*BucketId) ProtoMessage

func (*BucketId) ProtoMessage()

func (*BucketId) ProtoReflect

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

func (*BucketId) Reset

func (x *BucketId) Reset()

func (*BucketId) String

func (x *BucketId) String() string

func (*BucketId) Validate

func (m *BucketId) Validate() error

Validate checks the field values on BucketId with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*BucketId) ValidateAll

func (m *BucketId) ValidateAll() error

ValidateAll checks the field values on BucketId with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in BucketIdMultiError, or nil if none found.

type BucketIdMultiError

type BucketIdMultiError []error

BucketIdMultiError is an error wrapping multiple validation errors returned by BucketId.ValidateAll() if the designated constraints aren't met.

func (BucketIdMultiError) AllErrors

func (m BucketIdMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (BucketIdMultiError) Error

func (m BucketIdMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type BucketIdValidationError

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

BucketIdValidationError is the validation error returned by BucketId.Validate if the designated constraints aren't met.

func (BucketIdValidationError) Cause

func (e BucketIdValidationError) Cause() error

Cause function returns cause value.

func (BucketIdValidationError) Error

func (e BucketIdValidationError) Error() string

Error satisfies the builtin error interface

func (BucketIdValidationError) ErrorName

func (e BucketIdValidationError) ErrorName() string

ErrorName returns error name.

func (BucketIdValidationError) Field

func (e BucketIdValidationError) Field() string

Field function returns field value.

func (BucketIdValidationError) Key

func (e BucketIdValidationError) Key() bool

Key function returns key value.

func (BucketIdValidationError) Reason

func (e BucketIdValidationError) Reason() string

Reason function returns reason value.

type RateLimitQuotaResponse

type RateLimitQuotaResponse struct {

	// An ordered list of actions to be applied to the buckets. The actions are applied in the
	// given order, from top to bottom.
	BucketAction []*RateLimitQuotaResponse_BucketAction `protobuf:"bytes,1,rep,name=bucket_action,json=bucketAction,proto3" json:"bucket_action,omitempty"`
	// contains filtered or unexported fields
}

func (*RateLimitQuotaResponse) Descriptor deprecated

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

Deprecated: Use RateLimitQuotaResponse.ProtoReflect.Descriptor instead.

func (*RateLimitQuotaResponse) GetBucketAction

func (*RateLimitQuotaResponse) ProtoMessage

func (*RateLimitQuotaResponse) ProtoMessage()

func (*RateLimitQuotaResponse) ProtoReflect

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

func (*RateLimitQuotaResponse) Reset

func (x *RateLimitQuotaResponse) Reset()

func (*RateLimitQuotaResponse) String

func (x *RateLimitQuotaResponse) String() string

func (*RateLimitQuotaResponse) Validate

func (m *RateLimitQuotaResponse) Validate() error

Validate checks the field values on RateLimitQuotaResponse with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*RateLimitQuotaResponse) ValidateAll

func (m *RateLimitQuotaResponse) ValidateAll() error

ValidateAll checks the field values on RateLimitQuotaResponse with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in RateLimitQuotaResponseMultiError, or nil if none found.

type RateLimitQuotaResponseMultiError

type RateLimitQuotaResponseMultiError []error

RateLimitQuotaResponseMultiError is an error wrapping multiple validation errors returned by RateLimitQuotaResponse.ValidateAll() if the designated constraints aren't met.

func (RateLimitQuotaResponseMultiError) AllErrors

func (m RateLimitQuotaResponseMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (RateLimitQuotaResponseMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type RateLimitQuotaResponseValidationError

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

RateLimitQuotaResponseValidationError is the validation error returned by RateLimitQuotaResponse.Validate if the designated constraints aren't met.

func (RateLimitQuotaResponseValidationError) Cause

Cause function returns cause value.

func (RateLimitQuotaResponseValidationError) Error

Error satisfies the builtin error interface

func (RateLimitQuotaResponseValidationError) ErrorName

ErrorName returns error name.

func (RateLimitQuotaResponseValidationError) Field

Field function returns field value.

func (RateLimitQuotaResponseValidationError) Key

Key function returns key value.

func (RateLimitQuotaResponseValidationError) Reason

Reason function returns reason value.

type RateLimitQuotaResponse_BucketAction

type RateLimitQuotaResponse_BucketAction struct {

	// “BucketId“ for which request the action is applied.
	BucketId *BucketId `protobuf:"bytes,1,opt,name=bucket_id,json=bucketId,proto3" json:"bucket_id,omitempty"`
	// Types that are assignable to BucketAction:
	//	*RateLimitQuotaResponse_BucketAction_QuotaAssignmentAction_
	//	*RateLimitQuotaResponse_BucketAction_AbandonAction_
	BucketAction isRateLimitQuotaResponse_BucketAction_BucketAction `protobuf_oneof:"bucket_action"`
	// contains filtered or unexported fields
}

Commands the data plane to apply one of the actions to the bucket with the :ref:`bucket_id <envoy_v3_api_field_service.rate_limit_quota.v3.RateLimitQuotaResponse.BucketAction.bucket_id>`.

func (*RateLimitQuotaResponse_BucketAction) Descriptor deprecated

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

Deprecated: Use RateLimitQuotaResponse_BucketAction.ProtoReflect.Descriptor instead.

func (*RateLimitQuotaResponse_BucketAction) GetAbandonAction

func (*RateLimitQuotaResponse_BucketAction) GetBucketAction

func (m *RateLimitQuotaResponse_BucketAction) GetBucketAction() isRateLimitQuotaResponse_BucketAction_BucketAction

func (*RateLimitQuotaResponse_BucketAction) GetBucketId

func (*RateLimitQuotaResponse_BucketAction) GetQuotaAssignmentAction

func (*RateLimitQuotaResponse_BucketAction) ProtoMessage

func (*RateLimitQuotaResponse_BucketAction) ProtoMessage()

func (*RateLimitQuotaResponse_BucketAction) ProtoReflect

func (*RateLimitQuotaResponse_BucketAction) Reset

func (*RateLimitQuotaResponse_BucketAction) String

func (*RateLimitQuotaResponse_BucketAction) Validate

Validate checks the field values on RateLimitQuotaResponse_BucketAction with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*RateLimitQuotaResponse_BucketAction) ValidateAll

func (m *RateLimitQuotaResponse_BucketAction) ValidateAll() error

ValidateAll checks the field values on RateLimitQuotaResponse_BucketAction with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in RateLimitQuotaResponse_BucketActionMultiError, or nil if none found.

type RateLimitQuotaResponse_BucketActionMultiError

type RateLimitQuotaResponse_BucketActionMultiError []error

RateLimitQuotaResponse_BucketActionMultiError is an error wrapping multiple validation errors returned by RateLimitQuotaResponse_BucketAction.ValidateAll() if the designated constraints aren't met.

func (RateLimitQuotaResponse_BucketActionMultiError) AllErrors

AllErrors returns a list of validation violation errors.

func (RateLimitQuotaResponse_BucketActionMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type RateLimitQuotaResponse_BucketActionValidationError

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

RateLimitQuotaResponse_BucketActionValidationError is the validation error returned by RateLimitQuotaResponse_BucketAction.Validate if the designated constraints aren't met.

func (RateLimitQuotaResponse_BucketActionValidationError) Cause

Cause function returns cause value.

func (RateLimitQuotaResponse_BucketActionValidationError) Error

Error satisfies the builtin error interface

func (RateLimitQuotaResponse_BucketActionValidationError) ErrorName

ErrorName returns error name.

func (RateLimitQuotaResponse_BucketActionValidationError) Field

Field function returns field value.

func (RateLimitQuotaResponse_BucketActionValidationError) Key

Key function returns key value.

func (RateLimitQuotaResponse_BucketActionValidationError) Reason

Reason function returns reason value.

type RateLimitQuotaResponse_BucketAction_AbandonAction

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

Abandon action for the bucket. Indicates that the RLQS server will no longer be sending updates for the given :ref:`bucket_id <envoy_v3_api_field_service.rate_limit_quota.v3.RateLimitQuotaResponse.BucketAction.bucket_id>`.

If no requests are reported for a bucket, after some time the server considers the bucket inactive. The server stops tracking the bucket, and instructs the the data plane to abandon the bucket via this message.

**Abandoning the assignment**

The data plane is to erase the bucket (including its usage data) from the memory. It should stop tracking the bucket, and stop reporting its usage. This effectively resets the data plane to the state prior to matching the first request into the bucket.

**Restarting the subscription**

If a new request is matched into a bucket previously abandoned, the data plane must behave as if it has never tracked the bucket, and it's the first request matched into it:

  1. The process of :ref:`subscription and reporting <envoy_v3_api_field_extensions.filters.http.rate_limit_quota.v3.RateLimitQuotaBucketSettings.reporting_interval>` starts from the beginning.
  1. The bucket transitions to the :ref:`"no assignment" <envoy_v3_api_field_extensions.filters.http.rate_limit_quota.v3.RateLimitQuotaBucketSettings.no_assignment_behavior>` state.
  1. Once the new assignment is received, it's applied per "Applying the first assignment to the bucket" section of the :ref:`QuotaAssignmentAction <envoy_v3_api_msg_service.rate_limit_quota.v3.RateLimitQuotaResponse.BucketAction.QuotaAssignmentAction>`.

func (*RateLimitQuotaResponse_BucketAction_AbandonAction) Descriptor deprecated

Deprecated: Use RateLimitQuotaResponse_BucketAction_AbandonAction.ProtoReflect.Descriptor instead.

func (*RateLimitQuotaResponse_BucketAction_AbandonAction) ProtoMessage

func (*RateLimitQuotaResponse_BucketAction_AbandonAction) ProtoReflect

func (*RateLimitQuotaResponse_BucketAction_AbandonAction) Reset

func (*RateLimitQuotaResponse_BucketAction_AbandonAction) String

func (*RateLimitQuotaResponse_BucketAction_AbandonAction) Validate

Validate checks the field values on RateLimitQuotaResponse_BucketAction_AbandonAction with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*RateLimitQuotaResponse_BucketAction_AbandonAction) ValidateAll

ValidateAll checks the field values on RateLimitQuotaResponse_BucketAction_AbandonAction with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in RateLimitQuotaResponse_BucketAction_AbandonActionMultiError, or nil if none found.

type RateLimitQuotaResponse_BucketAction_AbandonActionMultiError

type RateLimitQuotaResponse_BucketAction_AbandonActionMultiError []error

RateLimitQuotaResponse_BucketAction_AbandonActionMultiError is an error wrapping multiple validation errors returned by RateLimitQuotaResponse_BucketAction_AbandonAction.ValidateAll() if the designated constraints aren't met.

func (RateLimitQuotaResponse_BucketAction_AbandonActionMultiError) AllErrors

AllErrors returns a list of validation violation errors.

func (RateLimitQuotaResponse_BucketAction_AbandonActionMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type RateLimitQuotaResponse_BucketAction_AbandonActionValidationError

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

RateLimitQuotaResponse_BucketAction_AbandonActionValidationError is the validation error returned by RateLimitQuotaResponse_BucketAction_AbandonAction.Validate if the designated constraints aren't met.

func (RateLimitQuotaResponse_BucketAction_AbandonActionValidationError) Cause

Cause function returns cause value.

func (RateLimitQuotaResponse_BucketAction_AbandonActionValidationError) Error

Error satisfies the builtin error interface

func (RateLimitQuotaResponse_BucketAction_AbandonActionValidationError) ErrorName

ErrorName returns error name.

func (RateLimitQuotaResponse_BucketAction_AbandonActionValidationError) Field

Field function returns field value.

func (RateLimitQuotaResponse_BucketAction_AbandonActionValidationError) Key

Key function returns key value.

func (RateLimitQuotaResponse_BucketAction_AbandonActionValidationError) Reason

Reason function returns reason value.

type RateLimitQuotaResponse_BucketAction_AbandonAction_

type RateLimitQuotaResponse_BucketAction_AbandonAction_ struct {
	// Abandon the bucket.
	//
	// Commands the data plane to abandon the bucket.
	// The process of abandoning the bucket is described in the :ref:`AbandonAction
	// <envoy_v3_api_msg_service.rate_limit_quota.v3.RateLimitQuotaResponse.BucketAction.AbandonAction>`
	// message.
	AbandonAction *RateLimitQuotaResponse_BucketAction_AbandonAction `protobuf:"bytes,3,opt,name=abandon_action,json=abandonAction,proto3,oneof"`
}

type RateLimitQuotaResponse_BucketAction_QuotaAssignmentAction

type RateLimitQuotaResponse_BucketAction_QuotaAssignmentAction struct {

	// A duration after which the assignment is be considered “expired“. The process of the
	// expiration is described :ref:`above
	// <envoy_v3_api_msg_service.rate_limit_quota.v3.RateLimitQuotaResponse.BucketAction.QuotaAssignmentAction>`.
	//
	// * If unset, the assignment has no expiration date.
	// * If set to “0“, the assignment expires immediately, forcing the client into the
	//   :ref:`"expired assignment"
	//   <envoy_v3_api_field_extensions.filters.http.rate_limit_quota.v3.RateLimitQuotaBucketSettings.ExpiredAssignmentBehavior.expired_assignment_behavior_timeout>`
	//   state. This may be used by the RLQS server in cases when it needs clients to proactively
	//   fall back to the pre-configured :ref:`ExpiredAssignmentBehavior
	//   <envoy_v3_api_msg_extensions.filters.http.rate_limit_quota.v3.RateLimitQuotaBucketSettings.ExpiredAssignmentBehavior>`,
	//   f.e. before the server going into restart.
	//
	// .. attention::
	//   Note that :ref:`expiring
	//   <envoy_v3_api_msg_service.rate_limit_quota.v3.RateLimitQuotaResponse.BucketAction.QuotaAssignmentAction>`
	//   the assignment is not the same as :ref:`abandoning
	//   <envoy_v3_api_msg_service.rate_limit_quota.v3.RateLimitQuotaResponse.BucketAction.AbandonAction>`
	//   the assignment. While expiring the assignment just transitions the bucket to
	//   the "expired assignment" state; abandoning the assignment completely erases
	//   the bucket from the data plane memory, and stops the usage reports.
	AssignmentTimeToLive *duration.Duration `protobuf:"bytes,2,opt,name=assignment_time_to_live,json=assignmentTimeToLive,proto3" json:"assignment_time_to_live,omitempty"`
	// Configures the local rate limiter for the request matched to the bucket.
	// If not set, allow all requests.
	RateLimitStrategy *v3.RateLimitStrategy `protobuf:"bytes,3,opt,name=rate_limit_strategy,json=rateLimitStrategy,proto3" json:"rate_limit_strategy,omitempty"`
	// contains filtered or unexported fields
}

Quota assignment for the bucket. Configures the rate limiting strategy and the duration for the given :ref:`bucket_id <envoy_v3_api_field_service.rate_limit_quota.v3.RateLimitQuotaResponse.BucketAction.bucket_id>`.

**Applying the first assignment to the bucket**

Once the data plane receives the “QuotaAssignmentAction“, it must send the current usage report for the bucket, and start rate limiting requests matched into the bucket using the strategy configured in the :ref:`rate_limit_strategy <envoy_v3_api_field_service.rate_limit_quota.v3.RateLimitQuotaResponse.BucketAction.QuotaAssignmentAction.rate_limit_strategy>` field. The assignment becomes bucket's “active“ assignment.

**Expiring the assignment**

The duration of the assignment defined in the :ref:`assignment_time_to_live <envoy_v3_api_field_service.rate_limit_quota.v3.RateLimitQuotaResponse.BucketAction.QuotaAssignmentAction.assignment_time_to_live>` field. When the duration runs off, the assignment is “expired“, and no longer “active“. The data plane should stop applying the rate limiting strategy to the bucket, and transition the bucket to the "expired assignment" state. This activates the behavior configured in the :ref:`expired_assignment_behavior <envoy_v3_api_field_extensions.filters.http.rate_limit_quota.v3.RateLimitQuotaBucketSettings.expired_assignment_behavior>` field.

**Replacing the assignment**

  • If the rate limiting strategy is different from bucket's “active“ assignment, or the current bucket assignment is “expired“, the data plane must immediately end the current assignment, report the bucket usage, and apply the new assignment. The new assignment becomes bucket's “active“ assignment.
  • If the rate limiting strategy is the same as the bucket's “active“ (not “expired“) assignment, the data plane should extend the duration of the “active“ assignment for the duration of the new assignment provided in the :ref:`assignment_time_to_live <envoy_v3_api_field_service.rate_limit_quota.v3.RateLimitQuotaResponse.BucketAction.QuotaAssignmentAction.assignment_time_to_live>` field. The “active“ assignment is considered unchanged.

func (*RateLimitQuotaResponse_BucketAction_QuotaAssignmentAction) Descriptor deprecated

Deprecated: Use RateLimitQuotaResponse_BucketAction_QuotaAssignmentAction.ProtoReflect.Descriptor instead.

func (*RateLimitQuotaResponse_BucketAction_QuotaAssignmentAction) GetAssignmentTimeToLive

func (*RateLimitQuotaResponse_BucketAction_QuotaAssignmentAction) GetRateLimitStrategy

func (*RateLimitQuotaResponse_BucketAction_QuotaAssignmentAction) ProtoMessage

func (*RateLimitQuotaResponse_BucketAction_QuotaAssignmentAction) ProtoReflect

func (*RateLimitQuotaResponse_BucketAction_QuotaAssignmentAction) Reset

func (*RateLimitQuotaResponse_BucketAction_QuotaAssignmentAction) String

func (*RateLimitQuotaResponse_BucketAction_QuotaAssignmentAction) Validate

Validate checks the field values on RateLimitQuotaResponse_BucketAction_QuotaAssignmentAction with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*RateLimitQuotaResponse_BucketAction_QuotaAssignmentAction) ValidateAll

ValidateAll checks the field values on RateLimitQuotaResponse_BucketAction_QuotaAssignmentAction with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in RateLimitQuotaResponse_BucketAction_QuotaAssignmentActionMultiError, or nil if none found.

type RateLimitQuotaResponse_BucketAction_QuotaAssignmentActionMultiError

type RateLimitQuotaResponse_BucketAction_QuotaAssignmentActionMultiError []error

RateLimitQuotaResponse_BucketAction_QuotaAssignmentActionMultiError is an error wrapping multiple validation errors returned by RateLimitQuotaResponse_BucketAction_QuotaAssignmentAction.ValidateAll() if the designated constraints aren't met.

func (RateLimitQuotaResponse_BucketAction_QuotaAssignmentActionMultiError) AllErrors

AllErrors returns a list of validation violation errors.

func (RateLimitQuotaResponse_BucketAction_QuotaAssignmentActionMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type RateLimitQuotaResponse_BucketAction_QuotaAssignmentActionValidationError

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

RateLimitQuotaResponse_BucketAction_QuotaAssignmentActionValidationError is the validation error returned by RateLimitQuotaResponse_BucketAction_QuotaAssignmentAction.Validate if the designated constraints aren't met.

func (RateLimitQuotaResponse_BucketAction_QuotaAssignmentActionValidationError) Cause

Cause function returns cause value.

func (RateLimitQuotaResponse_BucketAction_QuotaAssignmentActionValidationError) Error

Error satisfies the builtin error interface

func (RateLimitQuotaResponse_BucketAction_QuotaAssignmentActionValidationError) ErrorName

ErrorName returns error name.

func (RateLimitQuotaResponse_BucketAction_QuotaAssignmentActionValidationError) Field

Field function returns field value.

func (RateLimitQuotaResponse_BucketAction_QuotaAssignmentActionValidationError) Key

Key function returns key value.

func (RateLimitQuotaResponse_BucketAction_QuotaAssignmentActionValidationError) Reason

Reason function returns reason value.

type RateLimitQuotaResponse_BucketAction_QuotaAssignmentAction_

type RateLimitQuotaResponse_BucketAction_QuotaAssignmentAction_ struct {
	// Apply the quota assignment to the bucket.
	//
	// Commands the data plane to apply a rate limiting strategy to the bucket.
	// The process of applying and expiring the rate limiting strategy is detailed in the
	// :ref:`QuotaAssignmentAction
	// <envoy_v3_api_msg_service.rate_limit_quota.v3.RateLimitQuotaResponse.BucketAction.QuotaAssignmentAction>`
	// message.
	QuotaAssignmentAction *RateLimitQuotaResponse_BucketAction_QuotaAssignmentAction `protobuf:"bytes,2,opt,name=quota_assignment_action,json=quotaAssignmentAction,proto3,oneof"`
}

type RateLimitQuotaServiceClient

type RateLimitQuotaServiceClient interface {
	// Main communication channel: the data plane sends usage reports to the RLQS server,
	// and the server asynchronously responding with the assignments.
	StreamRateLimitQuotas(ctx context.Context, opts ...grpc.CallOption) (RateLimitQuotaService_StreamRateLimitQuotasClient, error)
}

RateLimitQuotaServiceClient is the client API for RateLimitQuotaService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

type RateLimitQuotaServiceServer

type RateLimitQuotaServiceServer interface {
	// Main communication channel: the data plane sends usage reports to the RLQS server,
	// and the server asynchronously responding with the assignments.
	StreamRateLimitQuotas(RateLimitQuotaService_StreamRateLimitQuotasServer) error
}

RateLimitQuotaServiceServer is the server API for RateLimitQuotaService service.

type RateLimitQuotaService_StreamRateLimitQuotasClient

type RateLimitQuotaService_StreamRateLimitQuotasClient interface {
	Send(*RateLimitQuotaUsageReports) error
	Recv() (*RateLimitQuotaResponse, error)
	grpc.ClientStream
}

type RateLimitQuotaService_StreamRateLimitQuotasServer

type RateLimitQuotaService_StreamRateLimitQuotasServer interface {
	Send(*RateLimitQuotaResponse) error
	Recv() (*RateLimitQuotaUsageReports, error)
	grpc.ServerStream
}

type RateLimitQuotaUsageReports

type RateLimitQuotaUsageReports struct {

	// All quota requests must specify the domain. This enables sharing the quota
	// server between different applications without fear of overlap.
	// E.g., "envoy".
	//
	// Should only be provided in the first report, all subsequent messages on the same
	// stream are considered to be in the same domain. In case the domain needs to be
	// changes, close the stream, and reopen a new one with the different domain.
	Domain string `protobuf:"bytes,1,opt,name=domain,proto3" json:"domain,omitempty"`
	// A list of quota usage reports. The list is processed by the RLQS server in the same order
	// it's provided by the client.
	BucketQuotaUsages []*RateLimitQuotaUsageReports_BucketQuotaUsage `protobuf:"bytes,2,rep,name=bucket_quota_usages,json=bucketQuotaUsages,proto3" json:"bucket_quota_usages,omitempty"`
	// contains filtered or unexported fields
}

func (*RateLimitQuotaUsageReports) Descriptor deprecated

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

Deprecated: Use RateLimitQuotaUsageReports.ProtoReflect.Descriptor instead.

func (*RateLimitQuotaUsageReports) GetBucketQuotaUsages

func (*RateLimitQuotaUsageReports) GetDomain

func (x *RateLimitQuotaUsageReports) GetDomain() string

func (*RateLimitQuotaUsageReports) ProtoMessage

func (*RateLimitQuotaUsageReports) ProtoMessage()

func (*RateLimitQuotaUsageReports) ProtoReflect

func (*RateLimitQuotaUsageReports) Reset

func (x *RateLimitQuotaUsageReports) Reset()

func (*RateLimitQuotaUsageReports) String

func (x *RateLimitQuotaUsageReports) String() string

func (*RateLimitQuotaUsageReports) Validate

func (m *RateLimitQuotaUsageReports) Validate() error

Validate checks the field values on RateLimitQuotaUsageReports with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*RateLimitQuotaUsageReports) ValidateAll

func (m *RateLimitQuotaUsageReports) ValidateAll() error

ValidateAll checks the field values on RateLimitQuotaUsageReports with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in RateLimitQuotaUsageReportsMultiError, or nil if none found.

type RateLimitQuotaUsageReportsMultiError

type RateLimitQuotaUsageReportsMultiError []error

RateLimitQuotaUsageReportsMultiError is an error wrapping multiple validation errors returned by RateLimitQuotaUsageReports.ValidateAll() if the designated constraints aren't met.

func (RateLimitQuotaUsageReportsMultiError) AllErrors

AllErrors returns a list of validation violation errors.

func (RateLimitQuotaUsageReportsMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type RateLimitQuotaUsageReportsValidationError

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

RateLimitQuotaUsageReportsValidationError is the validation error returned by RateLimitQuotaUsageReports.Validate if the designated constraints aren't met.

func (RateLimitQuotaUsageReportsValidationError) Cause

Cause function returns cause value.

func (RateLimitQuotaUsageReportsValidationError) Error

Error satisfies the builtin error interface

func (RateLimitQuotaUsageReportsValidationError) ErrorName

ErrorName returns error name.

func (RateLimitQuotaUsageReportsValidationError) Field

Field function returns field value.

func (RateLimitQuotaUsageReportsValidationError) Key

Key function returns key value.

func (RateLimitQuotaUsageReportsValidationError) Reason

Reason function returns reason value.

type RateLimitQuotaUsageReports_BucketQuotaUsage

type RateLimitQuotaUsageReports_BucketQuotaUsage struct {

	// “BucketId“ for which request quota usage is reported.
	BucketId *BucketId `protobuf:"bytes,1,opt,name=bucket_id,json=bucketId,proto3" json:"bucket_id,omitempty"`
	// Time elapsed since the last report.
	TimeElapsed *duration.Duration `protobuf:"bytes,2,opt,name=time_elapsed,json=timeElapsed,proto3" json:"time_elapsed,omitempty"`
	// Requests the data plane has allowed through.
	NumRequestsAllowed uint64 `protobuf:"varint,3,opt,name=num_requests_allowed,json=numRequestsAllowed,proto3" json:"num_requests_allowed,omitempty"`
	// Requests throttled.
	NumRequestsDenied uint64 `protobuf:"varint,4,opt,name=num_requests_denied,json=numRequestsDenied,proto3" json:"num_requests_denied,omitempty"`
	// contains filtered or unexported fields
}

The usage report for a bucket.

.. note::

Note that the first report sent for a ``BucketId`` indicates to the RLQS server that
the RLQS client is subscribing for the future assignments for this ``BucketId``.

func (*RateLimitQuotaUsageReports_BucketQuotaUsage) Descriptor deprecated

Deprecated: Use RateLimitQuotaUsageReports_BucketQuotaUsage.ProtoReflect.Descriptor instead.

func (*RateLimitQuotaUsageReports_BucketQuotaUsage) GetBucketId

func (*RateLimitQuotaUsageReports_BucketQuotaUsage) GetNumRequestsAllowed

func (x *RateLimitQuotaUsageReports_BucketQuotaUsage) GetNumRequestsAllowed() uint64

func (*RateLimitQuotaUsageReports_BucketQuotaUsage) GetNumRequestsDenied

func (x *RateLimitQuotaUsageReports_BucketQuotaUsage) GetNumRequestsDenied() uint64

func (*RateLimitQuotaUsageReports_BucketQuotaUsage) GetTimeElapsed

func (*RateLimitQuotaUsageReports_BucketQuotaUsage) ProtoMessage

func (*RateLimitQuotaUsageReports_BucketQuotaUsage) ProtoReflect

func (*RateLimitQuotaUsageReports_BucketQuotaUsage) Reset

func (*RateLimitQuotaUsageReports_BucketQuotaUsage) String

func (*RateLimitQuotaUsageReports_BucketQuotaUsage) Validate

Validate checks the field values on RateLimitQuotaUsageReports_BucketQuotaUsage with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*RateLimitQuotaUsageReports_BucketQuotaUsage) ValidateAll

ValidateAll checks the field values on RateLimitQuotaUsageReports_BucketQuotaUsage with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in RateLimitQuotaUsageReports_BucketQuotaUsageMultiError, or nil if none found.

type RateLimitQuotaUsageReports_BucketQuotaUsageMultiError

type RateLimitQuotaUsageReports_BucketQuotaUsageMultiError []error

RateLimitQuotaUsageReports_BucketQuotaUsageMultiError is an error wrapping multiple validation errors returned by RateLimitQuotaUsageReports_BucketQuotaUsage.ValidateAll() if the designated constraints aren't met.

func (RateLimitQuotaUsageReports_BucketQuotaUsageMultiError) AllErrors

AllErrors returns a list of validation violation errors.

func (RateLimitQuotaUsageReports_BucketQuotaUsageMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type RateLimitQuotaUsageReports_BucketQuotaUsageValidationError

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

RateLimitQuotaUsageReports_BucketQuotaUsageValidationError is the validation error returned by RateLimitQuotaUsageReports_BucketQuotaUsage.Validate if the designated constraints aren't met.

func (RateLimitQuotaUsageReports_BucketQuotaUsageValidationError) Cause

Cause function returns cause value.

func (RateLimitQuotaUsageReports_BucketQuotaUsageValidationError) Error

Error satisfies the builtin error interface

func (RateLimitQuotaUsageReports_BucketQuotaUsageValidationError) ErrorName

ErrorName returns error name.

func (RateLimitQuotaUsageReports_BucketQuotaUsageValidationError) Field

Field function returns field value.

func (RateLimitQuotaUsageReports_BucketQuotaUsageValidationError) Key

Key function returns key value.

func (RateLimitQuotaUsageReports_BucketQuotaUsageValidationError) Reason

Reason function returns reason value.

type UnimplementedRateLimitQuotaServiceServer

type UnimplementedRateLimitQuotaServiceServer struct {
}

UnimplementedRateLimitQuotaServiceServer can be embedded to have forward compatible implementations.

func (*UnimplementedRateLimitQuotaServiceServer) StreamRateLimitQuotas

Jump to

Keyboard shortcuts

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