| // Copyright 2020 The ChromiumOS Authors |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| |
| // Code generated by protoc-gen-go. DO NOT EDIT. |
| // versions: |
| // protoc-gen-go v1.27.1 |
| // protoc v3.17.1 |
| // source: test_platform/migration/test_runner/config.proto |
| |
| package test_runner |
| |
| import ( |
| protoreflect "google.golang.org/protobuf/reflect/protoreflect" |
| protoimpl "google.golang.org/protobuf/runtime/protoimpl" |
| reflect "reflect" |
| sync "sync" |
| ) |
| |
| const ( |
| // Verify that this generated code is sufficiently up-to-date. |
| _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) |
| // Verify that runtime/protoimpl is sufficiently up-to-date. |
| _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) |
| ) |
| |
| // Config describes how to split the entire traffic coming into CTP between |
| // test_runner and skylab_swarming_worker. |
| // The CTP requests directed to test_runner via |
| // request.migrations.use_test_runner are not affected by this config. |
| type Config struct { |
| state protoimpl.MessageState |
| sizeCache protoimpl.SizeCache |
| unknownFields protoimpl.UnknownFields |
| |
| RedirectInstructions []*RedirectInstruction `protobuf:"bytes,1,rep,name=redirect_instructions,json=redirectInstructions,proto3" json:"redirect_instructions,omitempty"` |
| } |
| |
| func (x *Config) Reset() { |
| *x = Config{} |
| if protoimpl.UnsafeEnabled { |
| mi := &file_test_platform_migration_test_runner_config_proto_msgTypes[0] |
| ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| ms.StoreMessageInfo(mi) |
| } |
| } |
| |
| func (x *Config) String() string { |
| return protoimpl.X.MessageStringOf(x) |
| } |
| |
| func (*Config) ProtoMessage() {} |
| |
| func (x *Config) ProtoReflect() protoreflect.Message { |
| mi := &file_test_platform_migration_test_runner_config_proto_msgTypes[0] |
| if protoimpl.UnsafeEnabled && x != nil { |
| ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| if ms.LoadMessageInfo() == nil { |
| ms.StoreMessageInfo(mi) |
| } |
| return ms |
| } |
| return mi.MessageOf(x) |
| } |
| |
| // Deprecated: Use Config.ProtoReflect.Descriptor instead. |
| func (*Config) Descriptor() ([]byte, []int) { |
| return file_test_platform_migration_test_runner_config_proto_rawDescGZIP(), []int{0} |
| } |
| |
| func (x *Config) GetRedirectInstructions() []*RedirectInstruction { |
| if x != nil { |
| return x.RedirectInstructions |
| } |
| return nil |
| } |
| |
| // RedirectInstruction describes the fraction and the type of traffic to |
| // send to test_runner. |
| type RedirectInstruction struct { |
| state protoimpl.MessageState |
| sizeCache protoimpl.SizeCache |
| unknownFields protoimpl.UnknownFields |
| |
| // Redirect a fraction of traffic that satisfies the constraint. |
| Constraint *TrafficConstraint `protobuf:"bytes,1,opt,name=constraint,proto3" json:"constraint,omitempty"` |
| // The probability of sending a given CTP request to test_runner as a |
| // percentage. Should be in (0, 100]. |
| PercentOfRequests int32 `protobuf:"varint,2,opt,name=percent_of_requests,json=percentOfRequests,proto3" json:"percent_of_requests,omitempty"` |
| } |
| |
| func (x *RedirectInstruction) Reset() { |
| *x = RedirectInstruction{} |
| if protoimpl.UnsafeEnabled { |
| mi := &file_test_platform_migration_test_runner_config_proto_msgTypes[1] |
| ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| ms.StoreMessageInfo(mi) |
| } |
| } |
| |
| func (x *RedirectInstruction) String() string { |
| return protoimpl.X.MessageStringOf(x) |
| } |
| |
| func (*RedirectInstruction) ProtoMessage() {} |
| |
| func (x *RedirectInstruction) ProtoReflect() protoreflect.Message { |
| mi := &file_test_platform_migration_test_runner_config_proto_msgTypes[1] |
| if protoimpl.UnsafeEnabled && x != nil { |
| ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| if ms.LoadMessageInfo() == nil { |
| ms.StoreMessageInfo(mi) |
| } |
| return ms |
| } |
| return mi.MessageOf(x) |
| } |
| |
| // Deprecated: Use RedirectInstruction.ProtoReflect.Descriptor instead. |
| func (*RedirectInstruction) Descriptor() ([]byte, []int) { |
| return file_test_platform_migration_test_runner_config_proto_rawDescGZIP(), []int{1} |
| } |
| |
| func (x *RedirectInstruction) GetConstraint() *TrafficConstraint { |
| if x != nil { |
| return x.Constraint |
| } |
| return nil |
| } |
| |
| func (x *RedirectInstruction) GetPercentOfRequests() int32 { |
| if x != nil { |
| return x.PercentOfRequests |
| } |
| return 0 |
| } |
| |
| // TrafficConstraint describes a way to filter CTP requests. |
| // The constraints are evaluated right before the execute step. Thus, the |
| // predecing steps (e.g. traffic splitter) may modify the inputs into the |
| // contraints before evaluation. |
| type TrafficConstraint struct { |
| state protoimpl.MessageState |
| sizeCache protoimpl.SizeCache |
| unknownFields protoimpl.UnknownFields |
| |
| // The DUT pool as it would appear in a Skylab request, e.g |
| // "DUT_POOL_QUOTA", "DUT_POOL_CTS", "wificell". |
| DutPool string `protobuf:"bytes,1,opt,name=dut_pool,json=dutPool,proto3" json:"dut_pool,omitempty"` |
| // The quota account as it would appear in a Skylab request, e.g. "pcq". |
| // Ignored if empty. |
| QuotaAccount string `protobuf:"bytes,2,opt,name=quota_account,json=quotaAccount,proto3" json:"quota_account,omitempty"` |
| } |
| |
| func (x *TrafficConstraint) Reset() { |
| *x = TrafficConstraint{} |
| if protoimpl.UnsafeEnabled { |
| mi := &file_test_platform_migration_test_runner_config_proto_msgTypes[2] |
| ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| ms.StoreMessageInfo(mi) |
| } |
| } |
| |
| func (x *TrafficConstraint) String() string { |
| return protoimpl.X.MessageStringOf(x) |
| } |
| |
| func (*TrafficConstraint) ProtoMessage() {} |
| |
| func (x *TrafficConstraint) ProtoReflect() protoreflect.Message { |
| mi := &file_test_platform_migration_test_runner_config_proto_msgTypes[2] |
| if protoimpl.UnsafeEnabled && x != nil { |
| ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| if ms.LoadMessageInfo() == nil { |
| ms.StoreMessageInfo(mi) |
| } |
| return ms |
| } |
| return mi.MessageOf(x) |
| } |
| |
| // Deprecated: Use TrafficConstraint.ProtoReflect.Descriptor instead. |
| func (*TrafficConstraint) Descriptor() ([]byte, []int) { |
| return file_test_platform_migration_test_runner_config_proto_rawDescGZIP(), []int{2} |
| } |
| |
| func (x *TrafficConstraint) GetDutPool() string { |
| if x != nil { |
| return x.DutPool |
| } |
| return "" |
| } |
| |
| func (x *TrafficConstraint) GetQuotaAccount() string { |
| if x != nil { |
| return x.QuotaAccount |
| } |
| return "" |
| } |
| |
| var File_test_platform_migration_test_runner_config_proto protoreflect.FileDescriptor |
| |
| var file_test_platform_migration_test_runner_config_proto_rawDesc = []byte{ |
| 0x0a, 0x30, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2f, |
| 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x72, |
| 0x75, 0x6e, 0x6e, 0x65, 0x72, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, |
| 0x74, 0x6f, 0x12, 0x23, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, |
| 0x6d, 0x2e, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x74, 0x65, 0x73, 0x74, |
| 0x5f, 0x72, 0x75, 0x6e, 0x6e, 0x65, 0x72, 0x22, 0x77, 0x0a, 0x06, 0x43, 0x6f, 0x6e, 0x66, 0x69, |
| 0x67, 0x12, 0x6d, 0x0a, 0x15, 0x72, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x6e, |
| 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, |
| 0x32, 0x38, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, |
| 0x2e, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x5f, |
| 0x72, 0x75, 0x6e, 0x6e, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x49, |
| 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x14, 0x72, 0x65, 0x64, 0x69, |
| 0x72, 0x65, 0x63, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, |
| 0x22, 0x9d, 0x01, 0x0a, 0x13, 0x52, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x49, 0x6e, 0x73, |
| 0x74, 0x72, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x56, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x73, |
| 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x74, |
| 0x65, 0x73, 0x74, 0x5f, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x6d, 0x69, 0x67, |
| 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x72, 0x75, 0x6e, 0x6e, |
| 0x65, 0x72, 0x2e, 0x54, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, |
| 0x61, 0x69, 0x6e, 0x74, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, |
| 0x12, 0x2e, 0x0a, 0x13, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x5f, 0x6f, 0x66, 0x5f, 0x72, |
| 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x11, 0x70, |
| 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x4f, 0x66, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, |
| 0x22, 0x53, 0x0a, 0x11, 0x54, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x43, 0x6f, 0x6e, 0x73, 0x74, |
| 0x72, 0x61, 0x69, 0x6e, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x64, 0x75, 0x74, 0x5f, 0x70, 0x6f, 0x6f, |
| 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x64, 0x75, 0x74, 0x50, 0x6f, 0x6f, 0x6c, |
| 0x12, 0x23, 0x0a, 0x0d, 0x71, 0x75, 0x6f, 0x74, 0x61, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, |
| 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x71, 0x75, 0x6f, 0x74, 0x61, 0x41, 0x63, |
| 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x4f, 0x5a, 0x4d, 0x67, 0x6f, 0x2e, 0x63, 0x68, 0x72, 0x6f, |
| 0x6d, 0x69, 0x75, 0x6d, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x63, 0x68, 0x72, 0x6f, 0x6d, 0x69, 0x75, |
| 0x6d, 0x6f, 0x73, 0x2f, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, |
| 0x67, 0x6f, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, |
| 0x2f, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x5f, |
| 0x72, 0x75, 0x6e, 0x6e, 0x65, 0x72, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, |
| } |
| |
| var ( |
| file_test_platform_migration_test_runner_config_proto_rawDescOnce sync.Once |
| file_test_platform_migration_test_runner_config_proto_rawDescData = file_test_platform_migration_test_runner_config_proto_rawDesc |
| ) |
| |
| func file_test_platform_migration_test_runner_config_proto_rawDescGZIP() []byte { |
| file_test_platform_migration_test_runner_config_proto_rawDescOnce.Do(func() { |
| file_test_platform_migration_test_runner_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_test_platform_migration_test_runner_config_proto_rawDescData) |
| }) |
| return file_test_platform_migration_test_runner_config_proto_rawDescData |
| } |
| |
| var file_test_platform_migration_test_runner_config_proto_msgTypes = make([]protoimpl.MessageInfo, 3) |
| var file_test_platform_migration_test_runner_config_proto_goTypes = []interface{}{ |
| (*Config)(nil), // 0: test_platform.migration.test_runner.Config |
| (*RedirectInstruction)(nil), // 1: test_platform.migration.test_runner.RedirectInstruction |
| (*TrafficConstraint)(nil), // 2: test_platform.migration.test_runner.TrafficConstraint |
| } |
| var file_test_platform_migration_test_runner_config_proto_depIdxs = []int32{ |
| 1, // 0: test_platform.migration.test_runner.Config.redirect_instructions:type_name -> test_platform.migration.test_runner.RedirectInstruction |
| 2, // 1: test_platform.migration.test_runner.RedirectInstruction.constraint:type_name -> test_platform.migration.test_runner.TrafficConstraint |
| 2, // [2:2] is the sub-list for method output_type |
| 2, // [2:2] is the sub-list for method input_type |
| 2, // [2:2] is the sub-list for extension type_name |
| 2, // [2:2] is the sub-list for extension extendee |
| 0, // [0:2] is the sub-list for field type_name |
| } |
| |
| func init() { file_test_platform_migration_test_runner_config_proto_init() } |
| func file_test_platform_migration_test_runner_config_proto_init() { |
| if File_test_platform_migration_test_runner_config_proto != nil { |
| return |
| } |
| if !protoimpl.UnsafeEnabled { |
| file_test_platform_migration_test_runner_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { |
| switch v := v.(*Config); i { |
| case 0: |
| return &v.state |
| case 1: |
| return &v.sizeCache |
| case 2: |
| return &v.unknownFields |
| default: |
| return nil |
| } |
| } |
| file_test_platform_migration_test_runner_config_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { |
| switch v := v.(*RedirectInstruction); i { |
| case 0: |
| return &v.state |
| case 1: |
| return &v.sizeCache |
| case 2: |
| return &v.unknownFields |
| default: |
| return nil |
| } |
| } |
| file_test_platform_migration_test_runner_config_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { |
| switch v := v.(*TrafficConstraint); i { |
| case 0: |
| return &v.state |
| case 1: |
| return &v.sizeCache |
| case 2: |
| return &v.unknownFields |
| default: |
| return nil |
| } |
| } |
| } |
| type x struct{} |
| out := protoimpl.TypeBuilder{ |
| File: protoimpl.DescBuilder{ |
| GoPackagePath: reflect.TypeOf(x{}).PkgPath(), |
| RawDescriptor: file_test_platform_migration_test_runner_config_proto_rawDesc, |
| NumEnums: 0, |
| NumMessages: 3, |
| NumExtensions: 0, |
| NumServices: 0, |
| }, |
| GoTypes: file_test_platform_migration_test_runner_config_proto_goTypes, |
| DependencyIndexes: file_test_platform_migration_test_runner_config_proto_depIdxs, |
| MessageInfos: file_test_platform_migration_test_runner_config_proto_msgTypes, |
| }.Build() |
| File_test_platform_migration_test_runner_config_proto = out.File |
| file_test_platform_migration_test_runner_config_proto_rawDesc = nil |
| file_test_platform_migration_test_runner_config_proto_goTypes = nil |
| file_test_platform_migration_test_runner_config_proto_depIdxs = nil |
| } |