storagepb

package
v1.3.13 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2021 License: Apache-2.0 Imports: 5 Imported by: 10

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Config_State_name = map[int32]string{
		0: "UNKNOWN_CONFIG_STATE",
		1: "ENABLED",
		2: "DISABLED",
	}
	Config_State_value = map[string]int32{
		"UNKNOWN_CONFIG_STATE": 0,
		"ENABLED":              1,
		"DISABLED":             2,
	}
)

Enum value maps for Config_State.

View Source
var File_storagepb_proto protoreflect.FileDescriptor

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 */
	// contains filtered or unexported fields
}

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 deprecated

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

Deprecated: Use Bucket.ProtoReflect.Descriptor instead.

func (*Bucket) GetLastReplenishMillisSinceEpoch

func (x *Bucket) GetLastReplenishMillisSinceEpoch() int64

func (*Bucket) GetTokens

func (x *Bucket) GetTokens() int64

func (*Bucket) ProtoMessage

func (*Bucket) ProtoMessage()

func (*Bucket) ProtoReflect added in v1.3.9

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

func (*Bucket) Reset

func (x *Bucket) Reset()

func (*Bucket) String

func (x *Bucket) String() string

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 assignable to ReplenishmentStrategy:
	//	*Config_SequencingBased
	//	*Config_TimeBased
	ReplenishmentStrategy isConfig_ReplenishmentStrategy `protobuf_oneof:"replenishment_strategy"`
	// contains filtered or unexported fields
}

Configuration of a quota.

func (*Config) Descriptor deprecated

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

Deprecated: Use Config.ProtoReflect.Descriptor instead.

func (*Config) GetMaxTokens

func (x *Config) GetMaxTokens() int64

func (*Config) GetName

func (x *Config) GetName() string

func (*Config) GetReplenishmentStrategy

func (m *Config) GetReplenishmentStrategy() isConfig_ReplenishmentStrategy

func (*Config) GetSequencingBased

func (x *Config) GetSequencingBased() *SequencingBasedStrategy

func (*Config) GetState

func (x *Config) GetState() Config_State

func (*Config) GetTimeBased

func (x *Config) GetTimeBased() *TimeBasedStrategy

func (*Config) ProtoMessage

func (*Config) ProtoMessage()

func (*Config) ProtoReflect added in v1.3.9

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

func (*Config) Reset

func (x *Config) Reset()

func (*Config) String

func (x *Config) String() string

type Config_SequencingBased

type Config_SequencingBased struct {
	// Sequencing-based replenishment settings.
	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) Descriptor added in v1.3.9

func (Config_State) Enum added in v1.3.9

func (x Config_State) Enum() *Config_State

func (Config_State) EnumDescriptor deprecated

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

Deprecated: Use Config_State.Descriptor instead.

func (Config_State) Number added in v1.3.9

func (Config_State) String

func (x Config_State) String() string

func (Config_State) Type added in v1.3.9

type Config_TimeBased

type Config_TimeBased struct {
	// Time-based replenishment settings.
	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"`
	// contains filtered or unexported fields
}

Configuration for all quotas. Stored at quotas/configs.

func (*Configs) Descriptor deprecated

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

Deprecated: Use Configs.ProtoReflect.Descriptor instead.

func (*Configs) GetConfigs

func (x *Configs) GetConfigs() []*Config

func (*Configs) ProtoMessage

func (*Configs) ProtoMessage()

func (*Configs) ProtoReflect added in v1.3.9

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

func (*Configs) Reset

func (x *Configs) Reset()

func (*Configs) String

func (x *Configs) String() string

type SequencingBasedStrategy

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

Sequencing-based replenishment strategy settings.

func (*SequencingBasedStrategy) Descriptor deprecated

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

Deprecated: Use SequencingBasedStrategy.ProtoReflect.Descriptor instead.

func (*SequencingBasedStrategy) ProtoMessage

func (*SequencingBasedStrategy) ProtoMessage()

func (*SequencingBasedStrategy) ProtoReflect added in v1.3.9

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

func (*SequencingBasedStrategy) Reset

func (x *SequencingBasedStrategy) Reset()

func (*SequencingBasedStrategy) String

func (x *SequencingBasedStrategy) String() string

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 */
	// contains filtered or unexported fields
}

Time-based replenishment strategy settings.

func (*TimeBasedStrategy) Descriptor deprecated

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

Deprecated: Use TimeBasedStrategy.ProtoReflect.Descriptor instead.

func (*TimeBasedStrategy) GetReplenishIntervalSeconds

func (x *TimeBasedStrategy) GetReplenishIntervalSeconds() int64

func (*TimeBasedStrategy) GetTokensToReplenish

func (x *TimeBasedStrategy) GetTokensToReplenish() int64

func (*TimeBasedStrategy) ProtoMessage

func (*TimeBasedStrategy) ProtoMessage()

func (*TimeBasedStrategy) ProtoReflect added in v1.3.9

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

func (*TimeBasedStrategy) Reset

func (x *TimeBasedStrategy) Reset()

func (*TimeBasedStrategy) String

func (x *TimeBasedStrategy) String() string

Jump to

Keyboard shortcuts

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