Documentation
¶
Overview ¶
Package config contains service configuration endpoints and data definition for qscheduler-swarming.
Index ¶
- Variables
- func Use(c context.Context, p Provider) context.Context
- type Auth
- func (*Auth) Descriptor() ([]byte, []int)deprecated
- func (x *Auth) GetAdminGroup() string
- func (x *Auth) GetSwarmingGroup() string
- func (x *Auth) GetViewGroup() string
- func (*Auth) ProtoMessage()
- func (x *Auth) ProtoReflect() protoreflect.Message
- func (x *Auth) Reset()
- func (x *Auth) String() string
- type Config
- func (*Config) Descriptor() ([]byte, []int)deprecated
- func (x *Config) GetAccessGroup() stringdeprecated
- func (x *Config) GetAuth() *Auth
- func (x *Config) GetQuotaScheduler() *QuotaScheduler
- func (*Config) ProtoMessage()
- func (x *Config) ProtoReflect() protoreflect.Message
- func (x *Config) Reset()
- func (x *Config) String() string
- type Loader
- type Provider
- type QuotaScheduler
- func (*QuotaScheduler) Descriptor() ([]byte, []int)deprecated
- func (x *QuotaScheduler) GetBatchConstructionWait() *durationpb.Duration
- func (x *QuotaScheduler) GetBatchMaxSize() int64
- func (x *QuotaScheduler) GetRequestInsertionWait() *durationpb.Duration
- func (*QuotaScheduler) ProtoMessage()
- func (x *QuotaScheduler) ProtoReflect() protoreflect.Message
- func (x *QuotaScheduler) Reset()
- func (x *QuotaScheduler) String() string
Constants ¶
This section is empty.
Variables ¶
var File_go_chromium_org_infra_qscheduler_service_app_config_config_proto protoreflect.FileDescriptor
Functions ¶
Types ¶
type Auth ¶
type Auth struct { // AdminGroup is the luci-auth group controlling access to the administrative // endpoints of this server (the QSchedulerAdmin API). // // Members of this group also receive QSchedulerView access. AdminGroup string `protobuf:"bytes,1,opt,name=admin_group,json=adminGroup,proto3" json:"admin_group,omitempty"` // SwarmingGroup is the luci-auth group controlling access to the scheduler // endpoints of this server (the swarming.ExternalScheduler API). SwarmingGroup string `protobuf:"bytes,2,opt,name=swarming_group,json=swarmingGroup,proto3" json:"swarming_group,omitempty"` // ViewGroup is the luci-auth group controlloing access to the qscheduler view // endpoints of the server (QSchedulerView API). ViewGroup string `protobuf:"bytes,3,opt,name=view_group,json=viewGroup,proto3" json:"view_group,omitempty"` // contains filtered or unexported fields }
func (*Auth) Descriptor
deprecated
func (*Auth) GetAdminGroup ¶
func (*Auth) GetSwarmingGroup ¶
func (*Auth) GetViewGroup ¶
func (*Auth) ProtoMessage ¶
func (*Auth) ProtoMessage()
func (*Auth) ProtoReflect ¶
func (x *Auth) ProtoReflect() protoreflect.Message
type Config ¶
type Config struct { // Deprecated: Marked as deprecated in go.chromium.org/infra/qscheduler/service/app/config/config.proto. AccessGroup string `protobuf:"bytes,1,opt,name=access_group,json=accessGroup,proto3" json:"access_group,omitempty"` // QuotaScheduler contains QS-specific config information. QuotaScheduler *QuotaScheduler `protobuf:"bytes,2,opt,name=quota_scheduler,json=quotaScheduler,proto3" json:"quota_scheduler,omitempty"` // Auth describes which access levels are granted to which groups. Auth *Auth `protobuf:"bytes,3,opt,name=auth,proto3" json:"auth,omitempty"` // contains filtered or unexported fields }
Config is the configuration data served by luci-config for this app.
func (*Config) Descriptor
deprecated
func (*Config) GetAccessGroup
deprecated
func (*Config) GetQuotaScheduler ¶
func (x *Config) GetQuotaScheduler() *QuotaScheduler
func (*Config) ProtoMessage ¶
func (*Config) ProtoMessage()
func (*Config) ProtoReflect ¶
func (x *Config) ProtoReflect() protoreflect.Message
type Loader ¶
type Loader struct { ConfigPath string // path to the config file, set via -qscheduler-config // contains filtered or unexported fields }
Loader periodically rereads qscheduler config file from disk and injects it into the request context.
Intended for GKE environment where the config is distributed as k8s ConfigMap object.
func (*Loader) Load ¶
Load parses and validates the config file.
On success remembers it as a "last good config", to be used when serving requests.
func (*Loader) RegisterFlags ¶
RegisterFlags registers CLI flags.
func (*Loader) ReloadLoop ¶
ReloadLoop periodically reloads the config file until the context is canceled.
type Provider ¶
type Provider func() *Config
Provider returns the current non-nil config when called.
type QuotaScheduler ¶
type QuotaScheduler struct { // If specified, the amount of time that a batch waits to collect requests // before executing. // // If unspecified, defaults to 300ms. // // A higher value causes batches to be larger and hence more efficient in // in terms of datastore operations, but adds overhead. BatchConstructionWait *durationpb.Duration `` /* 126-byte string literal not displayed */ // Maximum number of requests in a batch. // // Defaults to 1000. BatchMaxSize int64 `protobuf:"varint,3,opt,name=batch_max_size,json=batchMaxSize,proto3" json:"batch_max_size,omitempty"` // Maximum amount of time to wait for AssignTask and NotifyTask // to jump into a batch. // // If unspecified, defaults to 300ms. RequestInsertionWait *durationpb.Duration `protobuf:"bytes,4,opt,name=request_insertion_wait,json=requestInsertionWait,proto3" json:"request_insertion_wait,omitempty"` // contains filtered or unexported fields }
QuotaScheduler contains configuration information for the QuotaScheduler app.
func (*QuotaScheduler) Descriptor
deprecated
func (*QuotaScheduler) Descriptor() ([]byte, []int)
Deprecated: Use QuotaScheduler.ProtoReflect.Descriptor instead.
func (*QuotaScheduler) GetBatchConstructionWait ¶
func (x *QuotaScheduler) GetBatchConstructionWait() *durationpb.Duration
func (*QuotaScheduler) GetBatchMaxSize ¶
func (x *QuotaScheduler) GetBatchMaxSize() int64
func (*QuotaScheduler) GetRequestInsertionWait ¶
func (x *QuotaScheduler) GetRequestInsertionWait() *durationpb.Duration
func (*QuotaScheduler) ProtoMessage ¶
func (*QuotaScheduler) ProtoMessage()
func (*QuotaScheduler) ProtoReflect ¶
func (x *QuotaScheduler) ProtoReflect() protoreflect.Message
func (*QuotaScheduler) Reset ¶
func (x *QuotaScheduler) Reset()
func (*QuotaScheduler) String ¶
func (x *QuotaScheduler) String() string