quota

package
v0.0.11 Latest Latest
Warning

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

Go to latest
Published: May 15, 2020 License: Apache-2.0 Imports: 12 Imported by: 10

Documentation

Overview

Package quota is a generated protocol buffer package.

It is generated from these files:

quota/quota.proto

It has these top-level messages:

QuotaInfo
QuotaRequest
QuotaConfig
QuotaStatus

Index

Constants

View Source
const Default_QuotaRequest_Force bool = false

Variables

View Source
var (
	ErrInvalidLengthQuota = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowQuota   = fmt.Errorf("proto: integer overflow")
)

Functions

This section is empty.

Types

type QuotaConfig added in v0.0.10

type QuotaConfig struct {
	Role string `protobuf:"bytes,1,req,name=role" json:"role"`
	// Name-value pairs that define the resource guarantees.
	// Only scalar resources are currently supported.
	//
	// Mesos will try its best to ensure that the role can be
	// allocated at least as many resources as the guarantee.
	// Despite this, it's possible for the guarantee to not be
	// satisfiable, if:
	//   (1) The operator has overcommitted guarantees.
	//   (2) There is a loss of agents that such that the
	//       guarantees overcommit the cluster.
	//   (3) The scheduler is pickier than mesos knows about,
	//       e.g. the scheduler needs resources from agents
	//       with specific attributes.
	//
	// The provided guarantees will be validated to ensure it
	// is not overcommitting the cluster. The operator can
	// disable this via `UpdateQuota.force`.
	//
	// If the guarantee is omitted, there is no guarantee.
	//
	// Operators may want to set up alerting to let them know
	// when a guarantee cannot be satisfied.
	Guarantees map[string]mesos.Value_Scalar `` /* 130-byte string literal not displayed */
	// Name-value pairs that define the resource limits.
	// Only scalar resources are currently supported.
	//
	// Imposes a limit on the amount of resources allocated to the
	// role. Mesos will try its best to ensure that the role does
	// not exceed this limit. Despite this, the limit can be exceeded
	// when:
	//   (1) The limit is lowered below the allocation.
	//   (2) Some agents are partitioned and re-connect with
	//       resources allocated to the role.
	//
	// The provided limits will be validated to ensure it does not
	// exceed the total cluster size. The operator can disable
	// this check via `UpdateQuota.force`.
	//
	// If the limit is omitted, there is no limit.
	//
	// Operators may want to set up alerting to let them know
	// when the limit is exceeded.
	Limits map[string]mesos.Value_Scalar `protobuf:"bytes,3,rep,name=limits" json:"limits" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
}

* Describes a role's quota configuration. This replaces the legacy quota related messages: `QuotaInfo` and `QuotaRequest`. This is used in both `UPDATE_QUOTA` and `GET_QUOTA` calls as well as persisted in the registry.

We use this new message in the new call `UPDATE_QUOTA` instead of reusing the legacy `QuotaRequest` message. This avoids confusions with deprecated fields and provides a cleaner interface. In `QuotaStatus` returned by `GET_QUOTA`, the legacy `infos` field is still filled along side `configs` for backwards compatibility.

func NewPopulatedQuotaConfig added in v0.0.10

func NewPopulatedQuotaConfig(r randyQuota, easy bool) *QuotaConfig

func (*QuotaConfig) Descriptor added in v0.0.10

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

func (*QuotaConfig) Equal added in v0.0.10

func (this *QuotaConfig) Equal(that interface{}) bool

func (*QuotaConfig) GetGuarantees added in v0.0.10

func (m *QuotaConfig) GetGuarantees() map[string]mesos.Value_Scalar

func (*QuotaConfig) GetLimits added in v0.0.10

func (m *QuotaConfig) GetLimits() map[string]mesos.Value_Scalar

func (*QuotaConfig) GetRole added in v0.0.10

func (m *QuotaConfig) GetRole() string

func (*QuotaConfig) GoString added in v0.0.10

func (this *QuotaConfig) GoString() string

func (*QuotaConfig) Marshal added in v0.0.10

func (m *QuotaConfig) Marshal() (dAtA []byte, err error)

func (*QuotaConfig) MarshalJSON added in v0.0.10

func (mj *QuotaConfig) MarshalJSON() ([]byte, error)

func (*QuotaConfig) MarshalJSONBuf added in v0.0.10

func (mj *QuotaConfig) MarshalJSONBuf(buf fflib.EncodingBuffer) error

func (*QuotaConfig) MarshalTo added in v0.0.10

func (m *QuotaConfig) MarshalTo(dAtA []byte) (int, error)

func (*QuotaConfig) ProtoMessage added in v0.0.10

func (*QuotaConfig) ProtoMessage()

func (*QuotaConfig) Reset added in v0.0.10

func (m *QuotaConfig) Reset()

func (*QuotaConfig) Size added in v0.0.11

func (m *QuotaConfig) Size() (n int)

func (*QuotaConfig) String added in v0.0.10

func (this *QuotaConfig) String() string

func (*QuotaConfig) Unmarshal added in v0.0.10

func (m *QuotaConfig) Unmarshal(dAtA []byte) error

func (*QuotaConfig) UnmarshalJSON added in v0.0.10

func (uj *QuotaConfig) UnmarshalJSON(input []byte) error

func (*QuotaConfig) UnmarshalJSONFFLexer added in v0.0.10

func (uj *QuotaConfig) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error

func (*QuotaConfig) VerboseEqual added in v0.0.10

func (this *QuotaConfig) VerboseEqual(that interface{}) error

type QuotaInfo

type QuotaInfo struct {
	Role *string `protobuf:"bytes,1,opt,name=role" json:"role,omitempty"`
	// Principal which set the quota. Currently only operators can set quotas.
	Principal *string          `protobuf:"bytes,2,opt,name=principal" json:"principal,omitempty"`
	Guarantee []mesos.Resource `protobuf:"bytes,3,rep,name=guarantee" json:"guarantee"`
}

* Describes the resource guarantees for a role. Persisted in the registry.

func NewPopulatedQuotaInfo

func NewPopulatedQuotaInfo(r randyQuota, easy bool) *QuotaInfo

func (*QuotaInfo) Descriptor

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

func (*QuotaInfo) Equal

func (this *QuotaInfo) Equal(that interface{}) bool

func (*QuotaInfo) GetGuarantee

func (m *QuotaInfo) GetGuarantee() []mesos.Resource

func (*QuotaInfo) GetPrincipal

func (m *QuotaInfo) GetPrincipal() string

func (*QuotaInfo) GetRole

func (m *QuotaInfo) GetRole() string

func (*QuotaInfo) GoString

func (this *QuotaInfo) GoString() string

func (*QuotaInfo) Marshal

func (m *QuotaInfo) Marshal() (dAtA []byte, err error)

func (*QuotaInfo) MarshalJSON

func (mj *QuotaInfo) MarshalJSON() ([]byte, error)

func (*QuotaInfo) MarshalJSONBuf

func (mj *QuotaInfo) MarshalJSONBuf(buf fflib.EncodingBuffer) error

func (*QuotaInfo) MarshalTo

func (m *QuotaInfo) MarshalTo(dAtA []byte) (int, error)

func (*QuotaInfo) ProtoMessage

func (*QuotaInfo) ProtoMessage()

func (*QuotaInfo) Reset

func (m *QuotaInfo) Reset()

func (*QuotaInfo) Size added in v0.0.11

func (m *QuotaInfo) Size() (n int)

func (*QuotaInfo) String

func (this *QuotaInfo) String() string

func (*QuotaInfo) Unmarshal

func (m *QuotaInfo) Unmarshal(dAtA []byte) error

func (*QuotaInfo) UnmarshalJSON

func (uj *QuotaInfo) UnmarshalJSON(input []byte) error

func (*QuotaInfo) UnmarshalJSONFFLexer

func (uj *QuotaInfo) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error

func (*QuotaInfo) VerboseEqual

func (this *QuotaInfo) VerboseEqual(that interface{}) error

type QuotaRequest

type QuotaRequest struct {
	// See `guarantee` for the behavior of `force`.
	Force *bool   `protobuf:"varint,1,opt,name=force,def=0" json:"force,omitempty"`
	Role  *string `protobuf:"bytes,2,opt,name=role" json:"role,omitempty"`
	// Mesos will try its best to ensure that the role can be
	// allocated at least as many resources as the guarantee.
	// Despite this, it's possible for the guarantee to not be
	// satisfiable, if:
	//   (1) The operator has overcommitted guarantees.
	//   (2) There is a loss of agents that such that the
	//       guarantees overcommit the cluster.
	//   (3) The scheduler is pickier than mesos knows about,
	//       e.g. the scheduler needs resources from agents
	//       with specific attributes.
	//
	// The provided guarantee will be validated to ensure it
	// is not overcommitting the cluster. The operator can
	// disable this via `QuotaRequest.force`.
	//
	// If the guarantee is omitted, there is no guarantee.
	//
	// Operators may want to set up alerting to let them know
	// when a guarantee cannot be satisfied.
	//
	// NOTE: The resources must be scalars without additional
	// metadata like reservations, disk information, etc.
	Guarantee []mesos.Resource `protobuf:"bytes,3,rep,name=guarantee" json:"guarantee"`
}

* Describes an update to a role's quota. This is a copy of `QuotaInfo` which omits the principal since it is determined during authentication. Also allows the user to force the update in the case of a guarantee overcommit.

func NewPopulatedQuotaRequest

func NewPopulatedQuotaRequest(r randyQuota, easy bool) *QuotaRequest

func (*QuotaRequest) Descriptor

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

func (*QuotaRequest) Equal

func (this *QuotaRequest) Equal(that interface{}) bool

func (*QuotaRequest) GetForce

func (m *QuotaRequest) GetForce() bool

func (*QuotaRequest) GetGuarantee

func (m *QuotaRequest) GetGuarantee() []mesos.Resource

func (*QuotaRequest) GetRole

func (m *QuotaRequest) GetRole() string

func (*QuotaRequest) GoString

func (this *QuotaRequest) GoString() string

func (*QuotaRequest) Marshal

func (m *QuotaRequest) Marshal() (dAtA []byte, err error)

func (*QuotaRequest) MarshalJSON

func (mj *QuotaRequest) MarshalJSON() ([]byte, error)

func (*QuotaRequest) MarshalJSONBuf

func (mj *QuotaRequest) MarshalJSONBuf(buf fflib.EncodingBuffer) error

func (*QuotaRequest) MarshalTo

func (m *QuotaRequest) MarshalTo(dAtA []byte) (int, error)

func (*QuotaRequest) ProtoMessage

func (*QuotaRequest) ProtoMessage()

func (*QuotaRequest) Reset

func (m *QuotaRequest) Reset()

func (*QuotaRequest) Size added in v0.0.11

func (m *QuotaRequest) Size() (n int)

func (*QuotaRequest) String

func (this *QuotaRequest) String() string

func (*QuotaRequest) Unmarshal

func (m *QuotaRequest) Unmarshal(dAtA []byte) error

func (*QuotaRequest) UnmarshalJSON

func (uj *QuotaRequest) UnmarshalJSON(input []byte) error

func (*QuotaRequest) UnmarshalJSONFFLexer

func (uj *QuotaRequest) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error

func (*QuotaRequest) VerboseEqual

func (this *QuotaRequest) VerboseEqual(that interface{}) error

type QuotaStatus

type QuotaStatus struct {
	// Returns all non-default quotas. Those omitted from this
	// list have the default of: no guarantee and no limit.
	//
	// For backwards compatibility, `infos` are still filled along
	// side `configs`. Note, however `infos` will contain less information
	// comparing to `configs` (e.g. info does not contain information
	// regarding quota limits).
	Infos []QuotaInfo `protobuf:"bytes,1,rep,name=infos" json:"infos"`
	// Returns all non-default quotas. Those omitted from this
	// list have the default of: no guarantee and no limit.
	Configs []QuotaConfig `protobuf:"bytes,2,rep,name=configs" json:"configs"`
}

* `QuotaStatus` describes the internal representation for the /quota/status response and `GET_QUOTA` `master::Response`.

func NewPopulatedQuotaStatus

func NewPopulatedQuotaStatus(r randyQuota, easy bool) *QuotaStatus

func (*QuotaStatus) Descriptor

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

func (*QuotaStatus) Equal

func (this *QuotaStatus) Equal(that interface{}) bool

func (*QuotaStatus) GetConfigs added in v0.0.11

func (m *QuotaStatus) GetConfigs() []QuotaConfig

func (*QuotaStatus) GetInfos

func (m *QuotaStatus) GetInfos() []QuotaInfo

func (*QuotaStatus) GoString

func (this *QuotaStatus) GoString() string

func (*QuotaStatus) Marshal

func (m *QuotaStatus) Marshal() (dAtA []byte, err error)

func (*QuotaStatus) MarshalJSON

func (mj *QuotaStatus) MarshalJSON() ([]byte, error)

func (*QuotaStatus) MarshalJSONBuf

func (mj *QuotaStatus) MarshalJSONBuf(buf fflib.EncodingBuffer) error

func (*QuotaStatus) MarshalTo

func (m *QuotaStatus) MarshalTo(dAtA []byte) (int, error)

func (*QuotaStatus) ProtoMessage

func (*QuotaStatus) ProtoMessage()

func (*QuotaStatus) Reset

func (m *QuotaStatus) Reset()

func (*QuotaStatus) Size added in v0.0.11

func (m *QuotaStatus) Size() (n int)

func (*QuotaStatus) String

func (this *QuotaStatus) String() string

func (*QuotaStatus) Unmarshal

func (m *QuotaStatus) Unmarshal(dAtA []byte) error

func (*QuotaStatus) UnmarshalJSON

func (uj *QuotaStatus) UnmarshalJSON(input []byte) error

func (*QuotaStatus) UnmarshalJSONFFLexer

func (uj *QuotaStatus) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error

func (*QuotaStatus) VerboseEqual

func (this *QuotaStatus) VerboseEqual(that interface{}) error

Jump to

Keyboard shortcuts

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