Struct gapi_grpc::google::api::Quota[][src]

pub struct Quota {
    pub limits: Vec<QuotaLimit>,
    pub metric_rules: Vec<MetricRule>,
}

Quota configuration helps to achieve fairness and budgeting in service usage.

The metric based quota configuration works this way:

An example quota configuration in yaml format:

quota: limits:

 - name: apiWriteQpsPerProject
   metric: library.googleapis.com/write_calls
   unit: "1/min/{project}"  # rate limit for consumer projects
   values:
     STANDARD: 10000


 metric_rules:
 - selector: "*"
   metric_costs:
     library.googleapis.com/read_calls: 1
 - selector: google.example.library.v1.LibraryService.UpdateBook
   metric_costs:
     library.googleapis.com/write_calls: 2
 - selector: google.example.library.v1.LibraryService.DeleteBook
   metric_costs:
     library.googleapis.com/write_calls: 1

Corresponding Metric definition:

 metrics:
 - name: library.googleapis.com/read_calls
   display_name: Read requests
   metric_kind: DELTA
   value_type: INT64

 - name: library.googleapis.com/write_calls
   display_name: Write requests
   metric_kind: DELTA
   value_type: INT64

Fields

limits: Vec<QuotaLimit>

List of QuotaLimit definitions for the service.

metric_rules: Vec<MetricRule>

List of MetricRule definitions, each one mapping a selected method to one or more metrics.

Trait Implementations

impl Clone for Quota[src]

impl Debug for Quota[src]

impl Default for Quota[src]

impl Message for Quota[src]

impl PartialEq<Quota> for Quota[src]

impl StructuralPartialEq for Quota[src]

Auto Trait Implementations

impl RefUnwindSafe for Quota

impl Send for Quota

impl Sync for Quota

impl Unpin for Quota

impl UnwindSafe for Quota

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> IntoRequest<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 
[src]

impl<T> WithSubscriber for T[src]