github.com/google/cloudprober@v0.11.3/rds/file/proto/config.pb.go (about)

     1  // Configuration proto for Kubernetes provider.
     2  //
     3  // Example provider config:
     4  // {
     5  //   pods {}
     6  // }
     7  //
     8  // In probe config:
     9  // probe {
    10  //   targets{
    11  //     rds_targets {
    12  //       resource_path: "k8s://pods"
    13  //       filter {
    14  //         key: "namespace"
    15  //         value: "default"
    16  //       }
    17  //       filter {
    18  //         key: "name"
    19  //         value: "cloudprober.*"
    20  //       }
    21  //     }
    22  //   }
    23  // }
    24  
    25  // Code generated by protoc-gen-go. DO NOT EDIT.
    26  // versions:
    27  // 	protoc-gen-go v1.26.0
    28  // 	protoc        v3.17.3
    29  // source: github.com/google/cloudprober/rds/file/proto/config.proto
    30  
    31  package proto
    32  
    33  import (
    34  	proto "github.com/google/cloudprober/rds/proto"
    35  	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
    36  	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
    37  	reflect "reflect"
    38  	sync "sync"
    39  )
    40  
    41  const (
    42  	// Verify that this generated code is sufficiently up-to-date.
    43  	_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
    44  	// Verify that runtime/protoimpl is sufficiently up-to-date.
    45  	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
    46  )
    47  
    48  type ProviderConfig_Format int32
    49  
    50  const (
    51  	ProviderConfig_UNSPECIFIED ProviderConfig_Format = 0 // Determine format using file extension/
    52  	ProviderConfig_TEXTPB      ProviderConfig_Format = 1 // Text proto format (.textpb).
    53  	ProviderConfig_JSON        ProviderConfig_Format = 2 // JSON proto format (.json).
    54  )
    55  
    56  // Enum value maps for ProviderConfig_Format.
    57  var (
    58  	ProviderConfig_Format_name = map[int32]string{
    59  		0: "UNSPECIFIED",
    60  		1: "TEXTPB",
    61  		2: "JSON",
    62  	}
    63  	ProviderConfig_Format_value = map[string]int32{
    64  		"UNSPECIFIED": 0,
    65  		"TEXTPB":      1,
    66  		"JSON":        2,
    67  	}
    68  )
    69  
    70  func (x ProviderConfig_Format) Enum() *ProviderConfig_Format {
    71  	p := new(ProviderConfig_Format)
    72  	*p = x
    73  	return p
    74  }
    75  
    76  func (x ProviderConfig_Format) String() string {
    77  	return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
    78  }
    79  
    80  func (ProviderConfig_Format) Descriptor() protoreflect.EnumDescriptor {
    81  	return file_github_com_google_cloudprober_rds_file_proto_config_proto_enumTypes[0].Descriptor()
    82  }
    83  
    84  func (ProviderConfig_Format) Type() protoreflect.EnumType {
    85  	return &file_github_com_google_cloudprober_rds_file_proto_config_proto_enumTypes[0]
    86  }
    87  
    88  func (x ProviderConfig_Format) Number() protoreflect.EnumNumber {
    89  	return protoreflect.EnumNumber(x)
    90  }
    91  
    92  // Deprecated: Do not use.
    93  func (x *ProviderConfig_Format) UnmarshalJSON(b []byte) error {
    94  	num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
    95  	if err != nil {
    96  		return err
    97  	}
    98  	*x = ProviderConfig_Format(num)
    99  	return nil
   100  }
   101  
   102  // Deprecated: Use ProviderConfig_Format.Descriptor instead.
   103  func (ProviderConfig_Format) EnumDescriptor() ([]byte, []int) {
   104  	return file_github_com_google_cloudprober_rds_file_proto_config_proto_rawDescGZIP(), []int{0, 0}
   105  }
   106  
   107  // File provider config.
   108  type ProviderConfig struct {
   109  	state         protoimpl.MessageState
   110  	sizeCache     protoimpl.SizeCache
   111  	unknownFields protoimpl.UnknownFields
   112  
   113  	// File that contains resources in either textproto or json format.
   114  	// Example in textproto format:
   115  	//
   116  	// resource {
   117  	//   name: "switch-xx-01"
   118  	//   ip: "10.11.112.3"
   119  	//   port: 8080
   120  	//   labels {
   121  	//     key: "device_type"
   122  	//     value: "switch"
   123  	//   }
   124  	// }
   125  	// resource {
   126  	//   name: "switch-yy-01"
   127  	//   ip: "10.16.110.12"
   128  	//   port: 8080
   129  	// }
   130  	FilePath []string               `protobuf:"bytes,1,rep,name=file_path,json=filePath" json:"file_path,omitempty"`
   131  	Format   *ProviderConfig_Format `protobuf:"varint,2,opt,name=format,enum=cloudprober.rds.file.ProviderConfig_Format" json:"format,omitempty"`
   132  	// If specified, file will be re-read at the given interval.
   133  	ReEvalSec *int32 `protobuf:"varint,3,opt,name=re_eval_sec,json=reEvalSec" json:"re_eval_sec,omitempty"`
   134  	// Whenever possible, we reload a file only if it has been modified since the
   135  	// last load. If following option is set, mod time check is disabled.
   136  	// Note that mod-time check doesn't work for GCS.
   137  	DisableModifiedTimeCheck *bool `protobuf:"varint,4,opt,name=disable_modified_time_check,json=disableModifiedTimeCheck" json:"disable_modified_time_check,omitempty"`
   138  }
   139  
   140  func (x *ProviderConfig) Reset() {
   141  	*x = ProviderConfig{}
   142  	if protoimpl.UnsafeEnabled {
   143  		mi := &file_github_com_google_cloudprober_rds_file_proto_config_proto_msgTypes[0]
   144  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
   145  		ms.StoreMessageInfo(mi)
   146  	}
   147  }
   148  
   149  func (x *ProviderConfig) String() string {
   150  	return protoimpl.X.MessageStringOf(x)
   151  }
   152  
   153  func (*ProviderConfig) ProtoMessage() {}
   154  
   155  func (x *ProviderConfig) ProtoReflect() protoreflect.Message {
   156  	mi := &file_github_com_google_cloudprober_rds_file_proto_config_proto_msgTypes[0]
   157  	if protoimpl.UnsafeEnabled && x != nil {
   158  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
   159  		if ms.LoadMessageInfo() == nil {
   160  			ms.StoreMessageInfo(mi)
   161  		}
   162  		return ms
   163  	}
   164  	return mi.MessageOf(x)
   165  }
   166  
   167  // Deprecated: Use ProviderConfig.ProtoReflect.Descriptor instead.
   168  func (*ProviderConfig) Descriptor() ([]byte, []int) {
   169  	return file_github_com_google_cloudprober_rds_file_proto_config_proto_rawDescGZIP(), []int{0}
   170  }
   171  
   172  func (x *ProviderConfig) GetFilePath() []string {
   173  	if x != nil {
   174  		return x.FilePath
   175  	}
   176  	return nil
   177  }
   178  
   179  func (x *ProviderConfig) GetFormat() ProviderConfig_Format {
   180  	if x != nil && x.Format != nil {
   181  		return *x.Format
   182  	}
   183  	return ProviderConfig_UNSPECIFIED
   184  }
   185  
   186  func (x *ProviderConfig) GetReEvalSec() int32 {
   187  	if x != nil && x.ReEvalSec != nil {
   188  		return *x.ReEvalSec
   189  	}
   190  	return 0
   191  }
   192  
   193  func (x *ProviderConfig) GetDisableModifiedTimeCheck() bool {
   194  	if x != nil && x.DisableModifiedTimeCheck != nil {
   195  		return *x.DisableModifiedTimeCheck
   196  	}
   197  	return false
   198  }
   199  
   200  type FileResources struct {
   201  	state         protoimpl.MessageState
   202  	sizeCache     protoimpl.SizeCache
   203  	unknownFields protoimpl.UnknownFields
   204  
   205  	Resource []*proto.Resource `protobuf:"bytes,1,rep,name=resource" json:"resource,omitempty"`
   206  }
   207  
   208  func (x *FileResources) Reset() {
   209  	*x = FileResources{}
   210  	if protoimpl.UnsafeEnabled {
   211  		mi := &file_github_com_google_cloudprober_rds_file_proto_config_proto_msgTypes[1]
   212  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
   213  		ms.StoreMessageInfo(mi)
   214  	}
   215  }
   216  
   217  func (x *FileResources) String() string {
   218  	return protoimpl.X.MessageStringOf(x)
   219  }
   220  
   221  func (*FileResources) ProtoMessage() {}
   222  
   223  func (x *FileResources) ProtoReflect() protoreflect.Message {
   224  	mi := &file_github_com_google_cloudprober_rds_file_proto_config_proto_msgTypes[1]
   225  	if protoimpl.UnsafeEnabled && x != nil {
   226  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
   227  		if ms.LoadMessageInfo() == nil {
   228  			ms.StoreMessageInfo(mi)
   229  		}
   230  		return ms
   231  	}
   232  	return mi.MessageOf(x)
   233  }
   234  
   235  // Deprecated: Use FileResources.ProtoReflect.Descriptor instead.
   236  func (*FileResources) Descriptor() ([]byte, []int) {
   237  	return file_github_com_google_cloudprober_rds_file_proto_config_proto_rawDescGZIP(), []int{1}
   238  }
   239  
   240  func (x *FileResources) GetResource() []*proto.Resource {
   241  	if x != nil {
   242  		return x.Resource
   243  	}
   244  	return nil
   245  }
   246  
   247  var File_github_com_google_cloudprober_rds_file_proto_config_proto protoreflect.FileDescriptor
   248  
   249  var file_github_com_google_cloudprober_rds_file_proto_config_proto_rawDesc = []byte{
   250  	0x0a, 0x39, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x6f,
   251  	0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x70, 0x72, 0x6f, 0x62, 0x65, 0x72, 0x2f,
   252  	0x72, 0x64, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63,
   253  	0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x14, 0x63, 0x6c, 0x6f,
   254  	0x75, 0x64, 0x70, 0x72, 0x6f, 0x62, 0x65, 0x72, 0x2e, 0x72, 0x64, 0x73, 0x2e, 0x66, 0x69, 0x6c,
   255  	0x65, 0x1a, 0x31, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f,
   256  	0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x70, 0x72, 0x6f, 0x62, 0x65, 0x72,
   257  	0x2f, 0x72, 0x64, 0x73, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x72, 0x64, 0x73, 0x2e, 0x70,
   258  	0x72, 0x6f, 0x74, 0x6f, 0x22, 0x82, 0x02, 0x0a, 0x0e, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65,
   259  	0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x1b, 0x0a, 0x09, 0x66, 0x69, 0x6c, 0x65, 0x5f,
   260  	0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x66, 0x69, 0x6c, 0x65,
   261  	0x50, 0x61, 0x74, 0x68, 0x12, 0x43, 0x0a, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x02,
   262  	0x20, 0x01, 0x28, 0x0e, 0x32, 0x2b, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x70, 0x72, 0x6f, 0x62,
   263  	0x65, 0x72, 0x2e, 0x72, 0x64, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x2e, 0x50, 0x72, 0x6f, 0x76,
   264  	0x69, 0x64, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x46, 0x6f, 0x72, 0x6d, 0x61,
   265  	0x74, 0x52, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x1e, 0x0a, 0x0b, 0x72, 0x65, 0x5f,
   266  	0x65, 0x76, 0x61, 0x6c, 0x5f, 0x73, 0x65, 0x63, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09,
   267  	0x72, 0x65, 0x45, 0x76, 0x61, 0x6c, 0x53, 0x65, 0x63, 0x12, 0x3d, 0x0a, 0x1b, 0x64, 0x69, 0x73,
   268  	0x61, 0x62, 0x6c, 0x65, 0x5f, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x5f, 0x74, 0x69,
   269  	0x6d, 0x65, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x18,
   270  	0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x54,
   271  	0x69, 0x6d, 0x65, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x22, 0x2f, 0x0a, 0x06, 0x46, 0x6f, 0x72, 0x6d,
   272  	0x61, 0x74, 0x12, 0x0f, 0x0a, 0x0b, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45,
   273  	0x44, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x54, 0x45, 0x58, 0x54, 0x50, 0x42, 0x10, 0x01, 0x12,
   274  	0x08, 0x0a, 0x04, 0x4a, 0x53, 0x4f, 0x4e, 0x10, 0x02, 0x22, 0x46, 0x0a, 0x0d, 0x46, 0x69, 0x6c,
   275  	0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x35, 0x0a, 0x08, 0x72, 0x65,
   276  	0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63,
   277  	0x6c, 0x6f, 0x75, 0x64, 0x70, 0x72, 0x6f, 0x62, 0x65, 0x72, 0x2e, 0x72, 0x64, 0x73, 0x2e, 0x52,
   278  	0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63,
   279  	0x65, 0x42, 0x2e, 0x5a, 0x2c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f,
   280  	0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x70, 0x72, 0x6f, 0x62,
   281  	0x65, 0x72, 0x2f, 0x72, 0x64, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74,
   282  	0x6f,
   283  }
   284  
   285  var (
   286  	file_github_com_google_cloudprober_rds_file_proto_config_proto_rawDescOnce sync.Once
   287  	file_github_com_google_cloudprober_rds_file_proto_config_proto_rawDescData = file_github_com_google_cloudprober_rds_file_proto_config_proto_rawDesc
   288  )
   289  
   290  func file_github_com_google_cloudprober_rds_file_proto_config_proto_rawDescGZIP() []byte {
   291  	file_github_com_google_cloudprober_rds_file_proto_config_proto_rawDescOnce.Do(func() {
   292  		file_github_com_google_cloudprober_rds_file_proto_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_github_com_google_cloudprober_rds_file_proto_config_proto_rawDescData)
   293  	})
   294  	return file_github_com_google_cloudprober_rds_file_proto_config_proto_rawDescData
   295  }
   296  
   297  var file_github_com_google_cloudprober_rds_file_proto_config_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
   298  var file_github_com_google_cloudprober_rds_file_proto_config_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
   299  var file_github_com_google_cloudprober_rds_file_proto_config_proto_goTypes = []interface{}{
   300  	(ProviderConfig_Format)(0), // 0: cloudprober.rds.file.ProviderConfig.Format
   301  	(*ProviderConfig)(nil),     // 1: cloudprober.rds.file.ProviderConfig
   302  	(*FileResources)(nil),      // 2: cloudprober.rds.file.FileResources
   303  	(*proto.Resource)(nil),     // 3: cloudprober.rds.Resource
   304  }
   305  var file_github_com_google_cloudprober_rds_file_proto_config_proto_depIdxs = []int32{
   306  	0, // 0: cloudprober.rds.file.ProviderConfig.format:type_name -> cloudprober.rds.file.ProviderConfig.Format
   307  	3, // 1: cloudprober.rds.file.FileResources.resource:type_name -> cloudprober.rds.Resource
   308  	2, // [2:2] is the sub-list for method output_type
   309  	2, // [2:2] is the sub-list for method input_type
   310  	2, // [2:2] is the sub-list for extension type_name
   311  	2, // [2:2] is the sub-list for extension extendee
   312  	0, // [0:2] is the sub-list for field type_name
   313  }
   314  
   315  func init() { file_github_com_google_cloudprober_rds_file_proto_config_proto_init() }
   316  func file_github_com_google_cloudprober_rds_file_proto_config_proto_init() {
   317  	if File_github_com_google_cloudprober_rds_file_proto_config_proto != nil {
   318  		return
   319  	}
   320  	if !protoimpl.UnsafeEnabled {
   321  		file_github_com_google_cloudprober_rds_file_proto_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
   322  			switch v := v.(*ProviderConfig); i {
   323  			case 0:
   324  				return &v.state
   325  			case 1:
   326  				return &v.sizeCache
   327  			case 2:
   328  				return &v.unknownFields
   329  			default:
   330  				return nil
   331  			}
   332  		}
   333  		file_github_com_google_cloudprober_rds_file_proto_config_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
   334  			switch v := v.(*FileResources); i {
   335  			case 0:
   336  				return &v.state
   337  			case 1:
   338  				return &v.sizeCache
   339  			case 2:
   340  				return &v.unknownFields
   341  			default:
   342  				return nil
   343  			}
   344  		}
   345  	}
   346  	type x struct{}
   347  	out := protoimpl.TypeBuilder{
   348  		File: protoimpl.DescBuilder{
   349  			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
   350  			RawDescriptor: file_github_com_google_cloudprober_rds_file_proto_config_proto_rawDesc,
   351  			NumEnums:      1,
   352  			NumMessages:   2,
   353  			NumExtensions: 0,
   354  			NumServices:   0,
   355  		},
   356  		GoTypes:           file_github_com_google_cloudprober_rds_file_proto_config_proto_goTypes,
   357  		DependencyIndexes: file_github_com_google_cloudprober_rds_file_proto_config_proto_depIdxs,
   358  		EnumInfos:         file_github_com_google_cloudprober_rds_file_proto_config_proto_enumTypes,
   359  		MessageInfos:      file_github_com_google_cloudprober_rds_file_proto_config_proto_msgTypes,
   360  	}.Build()
   361  	File_github_com_google_cloudprober_rds_file_proto_config_proto = out.File
   362  	file_github_com_google_cloudprober_rds_file_proto_config_proto_rawDesc = nil
   363  	file_github_com_google_cloudprober_rds_file_proto_config_proto_goTypes = nil
   364  	file_github_com_google_cloudprober_rds_file_proto_config_proto_depIdxs = nil
   365  }