Documentation ¶
Index ¶
- Variables
- type Backend
- type Request
- func (*Request) Descriptor() ([]byte, []int)deprecated
- func (x *Request) GetBuildTarget() *chromiumos.BuildTarget
- func (x *Request) GetModel() string
- func (x *Request) GetScheduling() *test_platform.Request_Params_Scheduling
- func (*Request) ProtoMessage()
- func (x *Request) ProtoReflect() protoreflect.Message
- func (x *Request) Reset()
- func (x *Request) String() string
- type RequestMod
- type Rule
- func (*Rule) Descriptor() ([]byte, []int)deprecated
- func (x *Rule) GetBackend() Backend
- func (x *Rule) GetRequest() *Request
- func (x *Rule) GetRequestMod() *RequestMod
- func (*Rule) ProtoMessage()
- func (x *Rule) ProtoReflect() protoreflect.Message
- func (x *Rule) Reset()
- func (x *Rule) String() string
- type SuiteOverride
- func (*SuiteOverride) Descriptor() ([]byte, []int)deprecated
- func (x *SuiteOverride) GetRule() *Rule
- func (x *SuiteOverride) GetSuite() *test_platform.Request_Suite
- func (*SuiteOverride) ProtoMessage()
- func (x *SuiteOverride) ProtoReflect() protoreflect.Message
- func (x *SuiteOverride) Reset()
- func (x *SuiteOverride) String() string
- type TrafficSplit
- func (*TrafficSplit) Descriptor() ([]byte, []int)deprecated
- func (x *TrafficSplit) GetRules() []*Rule
- func (x *TrafficSplit) GetSuiteOverrides() []*SuiteOverride
- func (*TrafficSplit) ProtoMessage()
- func (x *TrafficSplit) ProtoReflect() protoreflect.Message
- func (x *TrafficSplit) Reset()
- func (x *TrafficSplit) String() string
Constants ¶
This section is empty.
Variables ¶
var ( Backend_name = map[int32]string{ 0: "BACKEND_UNSPECIFIED", 1: "BACKEND_AUTOTEST", 2: "BACKEND_SKYLAB", } Backend_value = map[string]int32{ "BACKEND_UNSPECIFIED": 0, "BACKEND_AUTOTEST": 1, "BACKEND_SKYLAB": 2, } )
Enum value maps for Backend.
var File_test_platform_migration_scheduler_traffic_split_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type Backend ¶
type Backend int32
func (Backend) Descriptor ¶
func (Backend) Descriptor() protoreflect.EnumDescriptor
func (Backend) EnumDescriptor
deprecated
func (Backend) Number ¶
func (x Backend) Number() protoreflect.EnumNumber
func (Backend) Type ¶
func (Backend) Type() protoreflect.EnumType
type Request ¶
type Request struct { Scheduling *test_platform.Request_Params_Scheduling `protobuf:"bytes,1,opt,name=scheduling,proto3" json:"scheduling,omitempty"` Model string `protobuf:"bytes,2,opt,name=model,proto3" json:"model,omitempty"` BuildTarget *chromiumos.BuildTarget `protobuf:"bytes,3,opt,name=build_target,json=buildTarget,proto3" json:"build_target,omitempty"` // contains filtered or unexported fields }
Request is a subset of test_platform.Request that is relevant to the scheduler backend traffic splitting decision.
func (*Request) Descriptor
deprecated
func (*Request) GetBuildTarget ¶
func (x *Request) GetBuildTarget() *chromiumos.BuildTarget
func (*Request) GetScheduling ¶
func (x *Request) GetScheduling() *test_platform.Request_Params_Scheduling
func (*Request) ProtoMessage ¶
func (*Request) ProtoMessage()
func (*Request) ProtoReflect ¶
func (x *Request) ProtoReflect() protoreflect.Message
type RequestMod ¶
type RequestMod struct { Scheduling *test_platform.Request_Params_Scheduling `protobuf:"bytes,1,opt,name=scheduling,proto3" json:"scheduling,omitempty"` // contains filtered or unexported fields }
RequestMod contains the test_platform.Requset arguments that must be overridden when forwarding a request to the chosen scheduler backend.
func (*RequestMod) Descriptor
deprecated
func (*RequestMod) Descriptor() ([]byte, []int)
Deprecated: Use RequestMod.ProtoReflect.Descriptor instead.
func (*RequestMod) GetScheduling ¶
func (x *RequestMod) GetScheduling() *test_platform.Request_Params_Scheduling
func (*RequestMod) ProtoMessage ¶
func (*RequestMod) ProtoMessage()
func (*RequestMod) ProtoReflect ¶
func (x *RequestMod) ProtoReflect() protoreflect.Message
func (*RequestMod) Reset ¶
func (x *RequestMod) Reset()
func (*RequestMod) String ¶
func (x *RequestMod) String() string
type Rule ¶
type Rule struct { Request *Request `protobuf:"bytes,1,opt,name=request,proto3" json:"request,omitempty"` Backend Backend `protobuf:"varint,2,opt,name=backend,proto3,enum=test_platform.migration.scheduler.Backend" json:"backend,omitempty"` RequestMod *RequestMod `protobuf:"bytes,3,opt,name=request_mod,json=requestMod,proto3" json:"request_mod,omitempty"` // contains filtered or unexported fields }
func (*Rule) Descriptor
deprecated
func (*Rule) GetBackend ¶
func (*Rule) GetRequest ¶
func (*Rule) GetRequestMod ¶
func (x *Rule) GetRequestMod() *RequestMod
func (*Rule) ProtoMessage ¶
func (*Rule) ProtoMessage()
func (*Rule) ProtoReflect ¶
func (x *Rule) ProtoReflect() protoreflect.Message
type SuiteOverride ¶
type SuiteOverride struct { // Incoming request must target this suite, in addition to the requirements // of the rule specified below. Suite *test_platform.Request_Suite `protobuf:"bytes,1,opt,name=suite,proto3" json:"suite,omitempty"` Rule *Rule `protobuf:"bytes,2,opt,name=rule,proto3" json:"rule,omitempty"` // contains filtered or unexported fields }
SuiteOverride provides per-suite overrides for the traffic split laid down by the basic rules.
func (*SuiteOverride) Descriptor
deprecated
func (*SuiteOverride) Descriptor() ([]byte, []int)
Deprecated: Use SuiteOverride.ProtoReflect.Descriptor instead.
func (*SuiteOverride) GetRule ¶
func (x *SuiteOverride) GetRule() *Rule
func (*SuiteOverride) GetSuite ¶
func (x *SuiteOverride) GetSuite() *test_platform.Request_Suite
func (*SuiteOverride) ProtoMessage ¶
func (*SuiteOverride) ProtoMessage()
func (*SuiteOverride) ProtoReflect ¶
func (x *SuiteOverride) ProtoReflect() protoreflect.Message
func (*SuiteOverride) Reset ¶
func (x *SuiteOverride) Reset()
func (*SuiteOverride) String ¶
func (x *SuiteOverride) String() string
type TrafficSplit ¶
type TrafficSplit struct { // Rules are expected to be exhaustive. If an incoming request does not match // any available rule, the traffic splitter will fail. // // This policy prevents requests for newly deployed models / pools from getting // scheduled on the incorrect scheduler and then timing out due to lack of // devices. Rules []*Rule `protobuf:"bytes,1,rep,name=rules,proto3" json:"rules,omitempty"` // Unlike rules, suite overrides are only specified for suites that need // different handling from the rule that otherwise matches the request. SuiteOverrides []*SuiteOverride `protobuf:"bytes,2,rep,name=suite_overrides,json=suiteOverrides,proto3" json:"suite_overrides,omitempty"` // contains filtered or unexported fields }
The cros_test_platform traffic splitting stage interprets this config in two phases.
- First, the request is matched to any of the rules in the suite_overrides, including the requested suite. If matching rules are found, second phase is skipped.
- Next, the request is matched against the base rules (exluding suite name) If no matching rules are found, the steps fails.
If multiple rules are found, they *must agree on the traffic splitting decision* including any pool overrides. In case of conflicting rules, the step fails.
func (*TrafficSplit) Descriptor
deprecated
func (*TrafficSplit) Descriptor() ([]byte, []int)
Deprecated: Use TrafficSplit.ProtoReflect.Descriptor instead.
func (*TrafficSplit) GetRules ¶
func (x *TrafficSplit) GetRules() []*Rule
func (*TrafficSplit) GetSuiteOverrides ¶
func (x *TrafficSplit) GetSuiteOverrides() []*SuiteOverride
func (*TrafficSplit) ProtoMessage ¶
func (*TrafficSplit) ProtoMessage()
func (*TrafficSplit) ProtoReflect ¶
func (x *TrafficSplit) ProtoReflect() protoreflect.Message
func (*TrafficSplit) Reset ¶
func (x *TrafficSplit) Reset()
func (*TrafficSplit) String ¶
func (x *TrafficSplit) String() string