Documentation ¶
Index ¶
- Variables
- type Bucket
- func (*Bucket) Descriptor() ([]byte, []int)
- func (m *Bucket) GetLastReplenishMillisSinceEpoch() int64
- func (m *Bucket) GetTokens() int64
- func (*Bucket) ProtoMessage()
- func (m *Bucket) Reset()
- func (m *Bucket) String() string
- func (m *Bucket) XXX_DiscardUnknown()
- func (m *Bucket) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Bucket) XXX_Merge(src proto.Message)
- func (m *Bucket) XXX_Size() int
- func (m *Bucket) XXX_Unmarshal(b []byte) error
- type Config
- func (*Config) Descriptor() ([]byte, []int)
- func (m *Config) GetMaxTokens() int64
- func (m *Config) GetName() string
- func (m *Config) GetReplenishmentStrategy() isConfig_ReplenishmentStrategy
- func (m *Config) GetSequencingBased() *SequencingBasedStrategy
- func (m *Config) GetState() Config_State
- func (m *Config) GetTimeBased() *TimeBasedStrategy
- func (*Config) ProtoMessage()
- func (m *Config) Reset()
- func (m *Config) String() string
- func (m *Config) XXX_DiscardUnknown()
- func (m *Config) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Config) XXX_Merge(src proto.Message)
- func (*Config) XXX_OneofWrappers() []interface{}
- func (m *Config) XXX_Size() int
- func (m *Config) XXX_Unmarshal(b []byte) error
- type Config_SequencingBased
- type Config_State
- type Config_TimeBased
- type Configs
- func (*Configs) Descriptor() ([]byte, []int)
- func (m *Configs) GetConfigs() []*Config
- func (*Configs) ProtoMessage()
- func (m *Configs) Reset()
- func (m *Configs) String() string
- func (m *Configs) XXX_DiscardUnknown()
- func (m *Configs) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Configs) XXX_Merge(src proto.Message)
- func (m *Configs) XXX_Size() int
- func (m *Configs) XXX_Unmarshal(b []byte) error
- type SequencingBasedStrategy
- func (*SequencingBasedStrategy) Descriptor() ([]byte, []int)
- func (*SequencingBasedStrategy) ProtoMessage()
- func (m *SequencingBasedStrategy) Reset()
- func (m *SequencingBasedStrategy) String() string
- func (m *SequencingBasedStrategy) XXX_DiscardUnknown()
- func (m *SequencingBasedStrategy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *SequencingBasedStrategy) XXX_Merge(src proto.Message)
- func (m *SequencingBasedStrategy) XXX_Size() int
- func (m *SequencingBasedStrategy) XXX_Unmarshal(b []byte) error
- type TimeBasedStrategy
- func (*TimeBasedStrategy) Descriptor() ([]byte, []int)
- func (m *TimeBasedStrategy) GetReplenishIntervalSeconds() int64
- func (m *TimeBasedStrategy) GetTokensToReplenish() int64
- func (*TimeBasedStrategy) ProtoMessage()
- func (m *TimeBasedStrategy) Reset()
- func (m *TimeBasedStrategy) String() string
- func (m *TimeBasedStrategy) XXX_DiscardUnknown()
- func (m *TimeBasedStrategy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *TimeBasedStrategy) XXX_Merge(src proto.Message)
- func (m *TimeBasedStrategy) XXX_Size() int
- func (m *TimeBasedStrategy) XXX_Unmarshal(b []byte) error
Constants ¶
This section is empty.
Variables ¶
View Source
var Config_State_name = map[int32]string{
0: "UNKNOWN_CONFIG_STATE",
1: "ENABLED",
2: "DISABLED",
}
View Source
var Config_State_value = map[string]int32{
"UNKNOWN_CONFIG_STATE": 0,
"ENABLED": 1,
"DISABLED": 2,
}
Functions ¶
This section is empty.
Types ¶
type Bucket ¶
type Bucket struct { // Number of tokens left in the bucket. Tokens int64 `protobuf:"varint,1,opt,name=tokens,proto3" json:"tokens,omitempty"` // Timestamp of the last time the bucket got replenished. LastReplenishMillisSinceEpoch int64 `` /* 155-byte string literal not displayed */ XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Data contained in a quota bucket. Stored at each each quota's zero bucket. For example, quotas/global/read/0 or quotas/trees/$id/read/0.
func (*Bucket) Descriptor ¶
func (*Bucket) GetLastReplenishMillisSinceEpoch ¶
func (*Bucket) ProtoMessage ¶
func (*Bucket) ProtoMessage()
func (*Bucket) XXX_DiscardUnknown ¶ added in v1.2.1
func (m *Bucket) XXX_DiscardUnknown()
func (*Bucket) XXX_Marshal ¶ added in v1.2.1
func (*Bucket) XXX_Unmarshal ¶ added in v1.2.1
type Config ¶
type Config struct { // Name of the config, eg, “quotas/trees/1234/read/config”. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // State of the config. State Config_State `protobuf:"varint,2,opt,name=state,proto3,enum=storagepb.Config_State" json:"state,omitempty"` // Max number of tokens available for the config. MaxTokens int64 `protobuf:"varint,3,opt,name=max_tokens,json=maxTokens,proto3" json:"max_tokens,omitempty"` // Replenishment strategy used by the config. // // Types that are valid to be assigned to ReplenishmentStrategy: // *Config_SequencingBased // *Config_TimeBased ReplenishmentStrategy isConfig_ReplenishmentStrategy `protobuf_oneof:"replenishment_strategy"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Configuration of a quota.
func (*Config) Descriptor ¶
func (*Config) GetMaxTokens ¶
func (*Config) GetReplenishmentStrategy ¶
func (m *Config) GetReplenishmentStrategy() isConfig_ReplenishmentStrategy
func (*Config) GetSequencingBased ¶
func (m *Config) GetSequencingBased() *SequencingBasedStrategy
func (*Config) GetState ¶
func (m *Config) GetState() Config_State
func (*Config) GetTimeBased ¶
func (m *Config) GetTimeBased() *TimeBasedStrategy
func (*Config) ProtoMessage ¶
func (*Config) ProtoMessage()
func (*Config) XXX_DiscardUnknown ¶ added in v1.2.1
func (m *Config) XXX_DiscardUnknown()
func (*Config) XXX_Marshal ¶ added in v1.2.1
func (*Config) XXX_OneofWrappers ¶ added in v1.3.0
func (*Config) XXX_OneofWrappers() []interface{}
XXX_OneofWrappers is for the internal use of the proto package.
func (*Config) XXX_Unmarshal ¶ added in v1.2.1
type Config_SequencingBased ¶
type Config_SequencingBased struct {
SequencingBased *SequencingBasedStrategy `protobuf:"bytes,4,opt,name=sequencing_based,json=sequencingBased,proto3,oneof"`
}
type Config_State ¶
type Config_State int32
Possible states of a quota configuration.
const ( // Unknown quota state. Invalid. Config_UNKNOWN_CONFIG_STATE Config_State = 0 // Quota is enabled. Config_ENABLED Config_State = 1 // Quota is disabled (considered infinite). Config_DISABLED Config_State = 2 )
func (Config_State) EnumDescriptor ¶
func (Config_State) EnumDescriptor() ([]byte, []int)
func (Config_State) String ¶
func (x Config_State) String() string
type Config_TimeBased ¶
type Config_TimeBased struct {
TimeBased *TimeBasedStrategy `protobuf:"bytes,5,opt,name=time_based,json=timeBased,proto3,oneof"`
}
type Configs ¶
type Configs struct { // Known quota configurations. Configs []*Config `protobuf:"bytes,1,rep,name=configs,proto3" json:"configs,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Configuration for all quotas. Stored at quotas/configs.
func (*Configs) Descriptor ¶
func (*Configs) GetConfigs ¶
func (*Configs) ProtoMessage ¶
func (*Configs) ProtoMessage()
func (*Configs) XXX_DiscardUnknown ¶ added in v1.2.1
func (m *Configs) XXX_DiscardUnknown()
func (*Configs) XXX_Marshal ¶ added in v1.2.1
func (*Configs) XXX_Unmarshal ¶ added in v1.2.1
type SequencingBasedStrategy ¶
type SequencingBasedStrategy struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Sequencing-based replenishment strategy settings.
func (*SequencingBasedStrategy) Descriptor ¶
func (*SequencingBasedStrategy) Descriptor() ([]byte, []int)
func (*SequencingBasedStrategy) ProtoMessage ¶
func (*SequencingBasedStrategy) ProtoMessage()
func (*SequencingBasedStrategy) Reset ¶
func (m *SequencingBasedStrategy) Reset()
func (*SequencingBasedStrategy) String ¶
func (m *SequencingBasedStrategy) String() string
func (*SequencingBasedStrategy) XXX_DiscardUnknown ¶ added in v1.2.1
func (m *SequencingBasedStrategy) XXX_DiscardUnknown()
func (*SequencingBasedStrategy) XXX_Marshal ¶ added in v1.2.1
func (m *SequencingBasedStrategy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*SequencingBasedStrategy) XXX_Merge ¶ added in v1.2.1
func (m *SequencingBasedStrategy) XXX_Merge(src proto.Message)
func (*SequencingBasedStrategy) XXX_Size ¶ added in v1.2.1
func (m *SequencingBasedStrategy) XXX_Size() int
func (*SequencingBasedStrategy) XXX_Unmarshal ¶ added in v1.2.1
func (m *SequencingBasedStrategy) XXX_Unmarshal(b []byte) error
type TimeBasedStrategy ¶
type TimeBasedStrategy struct { // Number of tokens to replenish at every replenish_interval_seconds. TokensToReplenish int64 `protobuf:"varint,1,opt,name=tokens_to_replenish,json=tokensToReplenish,proto3" json:"tokens_to_replenish,omitempty"` // Interval at which tokens_to_replenish get replenished. ReplenishIntervalSeconds int64 `` /* 136-byte string literal not displayed */ XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Time-based replenishment strategy settings.
func (*TimeBasedStrategy) Descriptor ¶
func (*TimeBasedStrategy) Descriptor() ([]byte, []int)
func (*TimeBasedStrategy) GetReplenishIntervalSeconds ¶
func (m *TimeBasedStrategy) GetReplenishIntervalSeconds() int64
func (*TimeBasedStrategy) GetTokensToReplenish ¶
func (m *TimeBasedStrategy) GetTokensToReplenish() int64
func (*TimeBasedStrategy) ProtoMessage ¶
func (*TimeBasedStrategy) ProtoMessage()
func (*TimeBasedStrategy) Reset ¶
func (m *TimeBasedStrategy) Reset()
func (*TimeBasedStrategy) String ¶
func (m *TimeBasedStrategy) String() string
func (*TimeBasedStrategy) XXX_DiscardUnknown ¶ added in v1.2.1
func (m *TimeBasedStrategy) XXX_DiscardUnknown()
func (*TimeBasedStrategy) XXX_Marshal ¶ added in v1.2.1
func (m *TimeBasedStrategy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*TimeBasedStrategy) XXX_Merge ¶ added in v1.2.1
func (m *TimeBasedStrategy) XXX_Merge(src proto.Message)
func (*TimeBasedStrategy) XXX_Size ¶ added in v1.2.1
func (m *TimeBasedStrategy) XXX_Size() int
func (*TimeBasedStrategy) XXX_Unmarshal ¶ added in v1.2.1
func (m *TimeBasedStrategy) XXX_Unmarshal(b []byte) error
Click to show internal directories.
Click to hide internal directories.