| // Code generated by protoc-gen-go. DO NOT EDIT. |
| // source: test_platform/migration/scheduler/traffic_split.proto |
| |
| package scheduler |
| |
| import ( |
| fmt "fmt" |
| proto "github.com/golang/protobuf/proto" |
| chromiumos "go.chromium.org/chromiumos/infra/proto/go/chromiumos" |
| test_platform "go.chromium.org/chromiumos/infra/proto/go/test_platform" |
| math "math" |
| ) |
| |
| // Reference imports to suppress errors if they are not otherwise used. |
| var _ = proto.Marshal |
| var _ = fmt.Errorf |
| var _ = math.Inf |
| |
| // This is a compile-time assertion to ensure that this generated file |
| // is compatible with the proto package it is being compiled against. |
| // A compilation error at this line likely means your copy of the |
| // proto package needs to be updated. |
| const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package |
| |
| type Backend int32 |
| |
| const ( |
| Backend_BACKEND_UNSPECIFIED Backend = 0 |
| Backend_BACKEND_AUTOTEST Backend = 1 |
| Backend_BACKEND_SKYLAB Backend = 2 |
| ) |
| |
| var Backend_name = map[int32]string{ |
| 0: "BACKEND_UNSPECIFIED", |
| 1: "BACKEND_AUTOTEST", |
| 2: "BACKEND_SKYLAB", |
| } |
| |
| var Backend_value = map[string]int32{ |
| "BACKEND_UNSPECIFIED": 0, |
| "BACKEND_AUTOTEST": 1, |
| "BACKEND_SKYLAB": 2, |
| } |
| |
| func (x Backend) String() string { |
| return proto.EnumName(Backend_name, int32(x)) |
| } |
| |
| func (Backend) EnumDescriptor() ([]byte, []int) { |
| return fileDescriptor_0f07a11268a8a808, []int{0} |
| } |
| |
| // The cros_test_platform traffic splitting stage interprets this config in two |
| // phases. |
| // 1. 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. |
| // 2. 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. |
| 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"` |
| XXX_NoUnkeyedLiteral struct{} `json:"-"` |
| XXX_unrecognized []byte `json:"-"` |
| XXX_sizecache int32 `json:"-"` |
| } |
| |
| func (m *TrafficSplit) Reset() { *m = TrafficSplit{} } |
| func (m *TrafficSplit) String() string { return proto.CompactTextString(m) } |
| func (*TrafficSplit) ProtoMessage() {} |
| func (*TrafficSplit) Descriptor() ([]byte, []int) { |
| return fileDescriptor_0f07a11268a8a808, []int{0} |
| } |
| |
| func (m *TrafficSplit) XXX_Unmarshal(b []byte) error { |
| return xxx_messageInfo_TrafficSplit.Unmarshal(m, b) |
| } |
| func (m *TrafficSplit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
| return xxx_messageInfo_TrafficSplit.Marshal(b, m, deterministic) |
| } |
| func (m *TrafficSplit) XXX_Merge(src proto.Message) { |
| xxx_messageInfo_TrafficSplit.Merge(m, src) |
| } |
| func (m *TrafficSplit) XXX_Size() int { |
| return xxx_messageInfo_TrafficSplit.Size(m) |
| } |
| func (m *TrafficSplit) XXX_DiscardUnknown() { |
| xxx_messageInfo_TrafficSplit.DiscardUnknown(m) |
| } |
| |
| var xxx_messageInfo_TrafficSplit proto.InternalMessageInfo |
| |
| func (m *TrafficSplit) GetRules() []*Rule { |
| if m != nil { |
| return m.Rules |
| } |
| return nil |
| } |
| |
| func (m *TrafficSplit) GetSuiteOverrides() []*SuiteOverride { |
| if m != nil { |
| return m.SuiteOverrides |
| } |
| return nil |
| } |
| |
| 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"` |
| XXX_NoUnkeyedLiteral struct{} `json:"-"` |
| XXX_unrecognized []byte `json:"-"` |
| XXX_sizecache int32 `json:"-"` |
| } |
| |
| func (m *Rule) Reset() { *m = Rule{} } |
| func (m *Rule) String() string { return proto.CompactTextString(m) } |
| func (*Rule) ProtoMessage() {} |
| func (*Rule) Descriptor() ([]byte, []int) { |
| return fileDescriptor_0f07a11268a8a808, []int{1} |
| } |
| |
| func (m *Rule) XXX_Unmarshal(b []byte) error { |
| return xxx_messageInfo_Rule.Unmarshal(m, b) |
| } |
| func (m *Rule) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
| return xxx_messageInfo_Rule.Marshal(b, m, deterministic) |
| } |
| func (m *Rule) XXX_Merge(src proto.Message) { |
| xxx_messageInfo_Rule.Merge(m, src) |
| } |
| func (m *Rule) XXX_Size() int { |
| return xxx_messageInfo_Rule.Size(m) |
| } |
| func (m *Rule) XXX_DiscardUnknown() { |
| xxx_messageInfo_Rule.DiscardUnknown(m) |
| } |
| |
| var xxx_messageInfo_Rule proto.InternalMessageInfo |
| |
| func (m *Rule) GetRequest() *Request { |
| if m != nil { |
| return m.Request |
| } |
| return nil |
| } |
| |
| func (m *Rule) GetBackend() Backend { |
| if m != nil { |
| return m.Backend |
| } |
| return Backend_BACKEND_UNSPECIFIED |
| } |
| |
| func (m *Rule) GetRequestMod() *RequestMod { |
| if m != nil { |
| return m.RequestMod |
| } |
| return nil |
| } |
| |
| // Request is a subset of test_platform.Request that is relevant to the |
| // scheduler backend traffic splitting decision. |
| 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"` |
| XXX_NoUnkeyedLiteral struct{} `json:"-"` |
| XXX_unrecognized []byte `json:"-"` |
| XXX_sizecache int32 `json:"-"` |
| } |
| |
| func (m *Request) Reset() { *m = Request{} } |
| func (m *Request) String() string { return proto.CompactTextString(m) } |
| func (*Request) ProtoMessage() {} |
| func (*Request) Descriptor() ([]byte, []int) { |
| return fileDescriptor_0f07a11268a8a808, []int{2} |
| } |
| |
| func (m *Request) XXX_Unmarshal(b []byte) error { |
| return xxx_messageInfo_Request.Unmarshal(m, b) |
| } |
| func (m *Request) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
| return xxx_messageInfo_Request.Marshal(b, m, deterministic) |
| } |
| func (m *Request) XXX_Merge(src proto.Message) { |
| xxx_messageInfo_Request.Merge(m, src) |
| } |
| func (m *Request) XXX_Size() int { |
| return xxx_messageInfo_Request.Size(m) |
| } |
| func (m *Request) XXX_DiscardUnknown() { |
| xxx_messageInfo_Request.DiscardUnknown(m) |
| } |
| |
| var xxx_messageInfo_Request proto.InternalMessageInfo |
| |
| func (m *Request) GetScheduling() *test_platform.Request_Params_Scheduling { |
| if m != nil { |
| return m.Scheduling |
| } |
| return nil |
| } |
| |
| func (m *Request) GetModel() string { |
| if m != nil { |
| return m.Model |
| } |
| return "" |
| } |
| |
| func (m *Request) GetBuildTarget() *chromiumos.BuildTarget { |
| if m != nil { |
| return m.BuildTarget |
| } |
| return nil |
| } |
| |
| // RequestMod contains the test_platform.Requset arguments that must be |
| // overridden when forwarding a request to the chosen scheduler backend. |
| type RequestMod struct { |
| Scheduling *test_platform.Request_Params_Scheduling `protobuf:"bytes,1,opt,name=scheduling,proto3" json:"scheduling,omitempty"` |
| XXX_NoUnkeyedLiteral struct{} `json:"-"` |
| XXX_unrecognized []byte `json:"-"` |
| XXX_sizecache int32 `json:"-"` |
| } |
| |
| func (m *RequestMod) Reset() { *m = RequestMod{} } |
| func (m *RequestMod) String() string { return proto.CompactTextString(m) } |
| func (*RequestMod) ProtoMessage() {} |
| func (*RequestMod) Descriptor() ([]byte, []int) { |
| return fileDescriptor_0f07a11268a8a808, []int{3} |
| } |
| |
| func (m *RequestMod) XXX_Unmarshal(b []byte) error { |
| return xxx_messageInfo_RequestMod.Unmarshal(m, b) |
| } |
| func (m *RequestMod) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
| return xxx_messageInfo_RequestMod.Marshal(b, m, deterministic) |
| } |
| func (m *RequestMod) XXX_Merge(src proto.Message) { |
| xxx_messageInfo_RequestMod.Merge(m, src) |
| } |
| func (m *RequestMod) XXX_Size() int { |
| return xxx_messageInfo_RequestMod.Size(m) |
| } |
| func (m *RequestMod) XXX_DiscardUnknown() { |
| xxx_messageInfo_RequestMod.DiscardUnknown(m) |
| } |
| |
| var xxx_messageInfo_RequestMod proto.InternalMessageInfo |
| |
| func (m *RequestMod) GetScheduling() *test_platform.Request_Params_Scheduling { |
| if m != nil { |
| return m.Scheduling |
| } |
| return nil |
| } |
| |
| // SuiteOverride provides per-suite overrides for the traffic split laid down by |
| // the basic rules. |
| 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"` |
| XXX_NoUnkeyedLiteral struct{} `json:"-"` |
| XXX_unrecognized []byte `json:"-"` |
| XXX_sizecache int32 `json:"-"` |
| } |
| |
| func (m *SuiteOverride) Reset() { *m = SuiteOverride{} } |
| func (m *SuiteOverride) String() string { return proto.CompactTextString(m) } |
| func (*SuiteOverride) ProtoMessage() {} |
| func (*SuiteOverride) Descriptor() ([]byte, []int) { |
| return fileDescriptor_0f07a11268a8a808, []int{4} |
| } |
| |
| func (m *SuiteOverride) XXX_Unmarshal(b []byte) error { |
| return xxx_messageInfo_SuiteOverride.Unmarshal(m, b) |
| } |
| func (m *SuiteOverride) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
| return xxx_messageInfo_SuiteOverride.Marshal(b, m, deterministic) |
| } |
| func (m *SuiteOverride) XXX_Merge(src proto.Message) { |
| xxx_messageInfo_SuiteOverride.Merge(m, src) |
| } |
| func (m *SuiteOverride) XXX_Size() int { |
| return xxx_messageInfo_SuiteOverride.Size(m) |
| } |
| func (m *SuiteOverride) XXX_DiscardUnknown() { |
| xxx_messageInfo_SuiteOverride.DiscardUnknown(m) |
| } |
| |
| var xxx_messageInfo_SuiteOverride proto.InternalMessageInfo |
| |
| func (m *SuiteOverride) GetSuite() *test_platform.Request_Suite { |
| if m != nil { |
| return m.Suite |
| } |
| return nil |
| } |
| |
| func (m *SuiteOverride) GetRule() *Rule { |
| if m != nil { |
| return m.Rule |
| } |
| return nil |
| } |
| |
| func init() { |
| proto.RegisterEnum("test_platform.migration.scheduler.Backend", Backend_name, Backend_value) |
| proto.RegisterType((*TrafficSplit)(nil), "test_platform.migration.scheduler.TrafficSplit") |
| proto.RegisterType((*Rule)(nil), "test_platform.migration.scheduler.Rule") |
| proto.RegisterType((*Request)(nil), "test_platform.migration.scheduler.Request") |
| proto.RegisterType((*RequestMod)(nil), "test_platform.migration.scheduler.RequestMod") |
| proto.RegisterType((*SuiteOverride)(nil), "test_platform.migration.scheduler.SuiteOverride") |
| } |
| |
| func init() { |
| proto.RegisterFile("test_platform/migration/scheduler/traffic_split.proto", fileDescriptor_0f07a11268a8a808) |
| } |
| |
| var fileDescriptor_0f07a11268a8a808 = []byte{ |
| // 486 bytes of a gzipped FileDescriptorProto |
| 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x94, 0xc1, 0x6e, 0xd3, 0x4c, |
| 0x10, 0xc7, 0x3f, 0xa7, 0xcd, 0x17, 0x31, 0x29, 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xe8, 0xe5, 0x1e, 0x42, |
| 0x5e, 0x49, 0x5e, 0x19, 0x90, 0x74, 0xe4, 0x76, 0x28, 0xed, 0x9f, 0x16, 0x1c, 0x96, 0xad, 0xd0, |
| 0x04, 0x5a, 0x66, 0x89, 0xbe, 0x35, 0xb0, 0x86, 0xed, 0xd1, 0xe9, 0x3e, 0x43, 0x56, 0x04, 0x59, |
| 0xa3, 0xa5, 0xca, 0x22, 0x8c, 0x3e, 0xd3, 0x3c, 0xee, 0x37, 0x06, 0xd6, 0xb0, 0xb3, 0x97, 0x8a, |
| 0x5b, 0x11, 0x64, 0x8d, 0xa2, 0x39, 0xb4, 0x8d, 0x60, 0x90, 0xf1, 0xb8, 0x7f, 0xa0, 0xe7, 0x79, |
| 0xb1, 0xff, 0x3c, 0x97, 0x3c, 0x26, 0x20, 0xea, 0x67, 0xfb, 0xbb, 0x05, 0x2d, 0x93, 0x42, 0x1f, |
| 0x00, 0x4c, 0x3d, 0xcb, 0x13, 0xb3, 0xea, 0xf0, 0x37, 0x69, 0x53, 0x8b, 0xaf, 0x43, 0x11, 0x66, |
| 0x12, 0x7b, 0x75, 0x3d, 0xd9, 0x62, 0xd1, 0x31, 0x34, 0x33, 0x1e, 0xd3, 0x54, 0x6f, 0xfa, 0x80, |
| 0x54, 0x01, 0x7a, 0x03, 0x47, 0x8b, 0x82, 0xa5, 0x71, 0xa0, 0x42, 0x91, 0x50, 0x65, 0x86, 0xef, |
| 0xe1, 0x8d, 0x91, 0xb0, 0x5b, 0xe6, 0x7d, 0x9d, 0x26, 0xed, 0xc5, 0x26, 0xb0, 0x3f, 0x02, 0x6c, |
| 0x36, 0xf8, 0x77, 0x93, 0xda, 0xdf, 0x2c, 0x78, 0xb8, 0x63, 0x03, 0x34, 0x82, 0xa6, 0x36, 0x82, |
| 0x91, 0x7d, 0xfa, 0x07, 0x59, 0x0d, 0x91, 0xaa, 0x14, 0xbd, 0x85, 0xc3, 0xd2, 0x8e, 0x7a, 0xdd, |
| 0x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