proto

package
v0.13.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 23, 2024 License: Apache-2.0 Imports: 9 Imported by: 1

Documentation

Index

Constants

View Source
const (
	Default_TargetsDef_ExcludeLameducks = bool(true)
)

Default values for TargetsDef fields.

Variables

View Source
var File_github_com_cloudprober_cloudprober_targets_proto_targets_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type DummyTargets

type DummyTargets struct {
	// contains filtered or unexported fields
}

DummyTargets represent empty targets, which are useful for external probes that do not have any "proper" targets. Such as ilbprober.

func (*DummyTargets) Descriptor deprecated

func (*DummyTargets) Descriptor() ([]byte, []int)

Deprecated: Use DummyTargets.ProtoReflect.Descriptor instead.

func (*DummyTargets) ProtoMessage

func (*DummyTargets) ProtoMessage()

func (*DummyTargets) ProtoReflect added in v0.11.4

func (x *DummyTargets) ProtoReflect() protoreflect.Message

func (*DummyTargets) Reset

func (x *DummyTargets) Reset()

func (*DummyTargets) String

func (x *DummyTargets) String() string

type Endpoint added in v0.13.1

type Endpoint struct {

	// Endpoint name. Metrics for a target are identified by a combination of
	// endpoint name and port name, if specified.
	Name *string `protobuf:"bytes,1,req,name=name" json:"name,omitempty"`
	// Optional IP address. If not specified, endpoint name is DNS resolved.
	Ip *string `protobuf:"bytes,2,opt,name=ip" json:"ip,omitempty"`
	// Endpoint port. If specified, this port will be used by the port-based
	// probes (e.g.  TCP, HTTP), if probe's configuration doesn't specify a port.
	Port *int32 `protobuf:"varint,3,opt,name=port" json:"port,omitempty"`
	// HTTP probe URL. If provided, this field is used by the HTTP probe, if
	// probe configuration itself doesn't specify URL fields.
	Url *string `protobuf:"bytes,4,opt,name=url" json:"url,omitempty"`
	// Endpoint labels. These labels can be exported as metrics labels using the
	// `additional_label` field in the probe configuration.
	Labels map[string]string `` /* 132-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*Endpoint) Descriptor deprecated added in v0.13.1

func (*Endpoint) Descriptor() ([]byte, []int)

Deprecated: Use Endpoint.ProtoReflect.Descriptor instead.

func (*Endpoint) GetIp added in v0.13.1

func (x *Endpoint) GetIp() string

func (*Endpoint) GetLabels added in v0.13.1

func (x *Endpoint) GetLabels() map[string]string

func (*Endpoint) GetName added in v0.13.1

func (x *Endpoint) GetName() string

func (*Endpoint) GetPort added in v0.13.1

func (x *Endpoint) GetPort() int32

func (*Endpoint) GetUrl added in v0.13.1

func (x *Endpoint) GetUrl() string

func (*Endpoint) ProtoMessage added in v0.13.1

func (*Endpoint) ProtoMessage()

func (*Endpoint) ProtoReflect added in v0.13.1

func (x *Endpoint) ProtoReflect() protoreflect.Message

func (*Endpoint) Reset added in v0.13.1

func (x *Endpoint) Reset()

func (*Endpoint) String added in v0.13.1

func (x *Endpoint) String() string

type GlobalTargetsOptions

type GlobalTargetsOptions struct {

	// RDS server address
	// Deprecated: This option is now deprecated, please use rds_server_options
	// instead.
	//
	// Deprecated: Marked as deprecated in github.com/cloudprober/cloudprober/targets/proto/targets.proto.
	RdsServerAddress *string `protobuf:"bytes,3,opt,name=rds_server_address,json=rdsServerAddress" json:"rds_server_address,omitempty"`
	// RDS server options, for example:
	//
	//	rds_server_options {
	//	  server_address: "rds-server.xyz:9314"
	//	  oauth_config: {
	//	    ...
	//	  }
	//	}
	RdsServerOptions *proto.ClientConf_ServerOptions `protobuf:"bytes,4,opt,name=rds_server_options,json=rdsServerOptions" json:"rds_server_options,omitempty"`
	// GCE targets options.
	GlobalGceTargetsOptions *proto2.GlobalOptions `` /* 127-byte string literal not displayed */
	// Lame duck options. If provided, targets module checks for the lame duck
	// targets and removes them from the targets list.
	LameDuckOptions *proto4.Options `protobuf:"bytes,2,opt,name=lame_duck_options,json=lameDuckOptions" json:"lame_duck_options,omitempty"`
	// contains filtered or unexported fields
}

Global targets options. These options are independent of the per-probe targets which are defined by the "Targets" type above.

Currently these options are used only for GCE targets to control things like how often to re-evaluate the targets and whether to check for lame ducks or not.

func (*GlobalTargetsOptions) Descriptor deprecated

func (*GlobalTargetsOptions) Descriptor() ([]byte, []int)

Deprecated: Use GlobalTargetsOptions.ProtoReflect.Descriptor instead.

func (*GlobalTargetsOptions) GetGlobalGceTargetsOptions

func (x *GlobalTargetsOptions) GetGlobalGceTargetsOptions() *proto2.GlobalOptions

func (*GlobalTargetsOptions) GetLameDuckOptions

func (x *GlobalTargetsOptions) GetLameDuckOptions() *proto4.Options

func (*GlobalTargetsOptions) GetRdsServerAddress deprecated added in v0.10.5

func (x *GlobalTargetsOptions) GetRdsServerAddress() string

Deprecated: Marked as deprecated in github.com/cloudprober/cloudprober/targets/proto/targets.proto.

func (*GlobalTargetsOptions) GetRdsServerOptions added in v0.11.4

func (x *GlobalTargetsOptions) GetRdsServerOptions() *proto.ClientConf_ServerOptions

func (*GlobalTargetsOptions) ProtoMessage

func (*GlobalTargetsOptions) ProtoMessage()

func (*GlobalTargetsOptions) ProtoReflect added in v0.11.4

func (x *GlobalTargetsOptions) ProtoReflect() protoreflect.Message

func (*GlobalTargetsOptions) Reset

func (x *GlobalTargetsOptions) Reset()

func (*GlobalTargetsOptions) String

func (x *GlobalTargetsOptions) String() string

type K8STargets added in v0.12.4

type K8STargets struct {

	// Targets namespace. If this field is unset, we select resources from all
	// namespaces.
	Namespace *string `protobuf:"bytes,1,opt,name=namespace" json:"namespace,omitempty"`
	// labelSelector uses the same format as kubernetes API calls.
	// Example:
	//
	//	labelSelector: "k8s-app"       # label k8s-app exists
	//	labelSelector: "role=frontend" # label role=frontend
	//	labelSelector: "!canary"       # canary label doesn't exist
	LabelSelector []string `protobuf:"bytes,2,rep,name=labelSelector" json:"labelSelector,omitempty"`
	// Which resources to target. If value is not empty (""), we use it as a
	// regex for resource names.
	// Example:
	//
	//	services: ""             // All services.
	//	endpoints: ".*-service"  // Endpoints ending with "service".
	//
	// Types that are assignable to Resources:
	//
	//	*K8STargets_Services
	//	*K8STargets_Endpoints
	//	*K8STargets_Ingresses
	//	*K8STargets_Pods
	Resources isK8STargets_Resources `protobuf_oneof:"resources"`
	// portFilter can be used to filter resources by port name. This is useful
	// for resources like endpoints and services, where each resource may have
	// multiple ports, and we may hit just a subset of those ports. portFilter
	// takes a regex -- we apply it on port names if port name is available,
	// otherwise we apply it port numbers.
	// Example: ".*-dns", "metrics", ".*-service", etc.
	PortFilter *string `protobuf:"bytes,10,opt,name=portFilter" json:"portFilter,omitempty"`
	// How often to re-check k8s API servers. Note this field will be irrelevant
	// when (and if) we move to the watch API. Default is 30s.
	ReEvalSec        *int32                          `protobuf:"varint,19,opt,name=re_eval_sec,json=reEvalSec" json:"re_eval_sec,omitempty"`
	RdsServerOptions *proto.ClientConf_ServerOptions `protobuf:"bytes,20,opt,name=rds_server_options,json=rdsServerOptions" json:"rds_server_options,omitempty"`
	// contains filtered or unexported fields
}

func (*K8STargets) Descriptor deprecated added in v0.12.4

func (*K8STargets) Descriptor() ([]byte, []int)

Deprecated: Use K8STargets.ProtoReflect.Descriptor instead.

func (*K8STargets) GetEndpoints added in v0.12.4

func (x *K8STargets) GetEndpoints() string

func (*K8STargets) GetIngresses added in v0.12.4

func (x *K8STargets) GetIngresses() string

func (*K8STargets) GetLabelSelector added in v0.12.4

func (x *K8STargets) GetLabelSelector() []string

func (*K8STargets) GetNamespace added in v0.12.4

func (x *K8STargets) GetNamespace() string

func (*K8STargets) GetPods added in v0.12.4

func (x *K8STargets) GetPods() string

func (*K8STargets) GetPortFilter added in v0.12.4

func (x *K8STargets) GetPortFilter() string

func (*K8STargets) GetRdsServerOptions added in v0.12.4

func (x *K8STargets) GetRdsServerOptions() *proto.ClientConf_ServerOptions

func (*K8STargets) GetReEvalSec added in v0.12.4

func (x *K8STargets) GetReEvalSec() int32

func (*K8STargets) GetResources added in v0.12.4

func (m *K8STargets) GetResources() isK8STargets_Resources

func (*K8STargets) GetServices added in v0.12.4

func (x *K8STargets) GetServices() string

func (*K8STargets) ProtoMessage added in v0.12.4

func (*K8STargets) ProtoMessage()

func (*K8STargets) ProtoReflect added in v0.12.4

func (x *K8STargets) ProtoReflect() protoreflect.Message

func (*K8STargets) Reset added in v0.12.4

func (x *K8STargets) Reset()

func (*K8STargets) String added in v0.12.4

func (x *K8STargets) String() string

type K8STargets_Endpoints added in v0.12.4

type K8STargets_Endpoints struct {
	Endpoints string `protobuf:"bytes,4,opt,name=endpoints,oneof"`
}

type K8STargets_Ingresses added in v0.12.4

type K8STargets_Ingresses struct {
	Ingresses string `protobuf:"bytes,5,opt,name=ingresses,oneof"`
}

type K8STargets_Pods added in v0.12.4

type K8STargets_Pods struct {
	Pods string `protobuf:"bytes,6,opt,name=pods,oneof"`
}

type K8STargets_Services added in v0.12.4

type K8STargets_Services struct {
	Services string `protobuf:"bytes,3,opt,name=services,oneof"`
}

type RDSTargets added in v0.10.5

type RDSTargets struct {

	// RDS server options, for example:
	//
	//	rds_server_options {
	//	  server_address: "rds-server.xyz:9314"
	//	  oauth_config: {
	//	    ...
	//	  }
	//	}
	RdsServerOptions *proto.ClientConf_ServerOptions `protobuf:"bytes,1,opt,name=rds_server_options,json=rdsServerOptions" json:"rds_server_options,omitempty"`
	// Resource path specifies the resources to return. Resources paths have the
	// following format:
	// <resource_provider>://<resource_type>/<additional_params>
	//
	// Examples:
	// For GCE instances in projectA: "gcp://gce_instances/<projectA>"
	// Kubernetes Pods : "k8s://pods"
	ResourcePath *string `protobuf:"bytes,2,opt,name=resource_path,json=resourcePath" json:"resource_path,omitempty"`
	// Filters to filter resources by.
	Filter []*proto1.Filter `protobuf:"bytes,3,rep,name=filter" json:"filter,omitempty"`
	// IP config to specify the IP address to pick for a resource.
	IpConfig *proto1.IPConfig `protobuf:"bytes,4,opt,name=ip_config,json=ipConfig" json:"ip_config,omitempty"`
	// contains filtered or unexported fields
}

func (*RDSTargets) Descriptor deprecated added in v0.10.5

func (*RDSTargets) Descriptor() ([]byte, []int)

Deprecated: Use RDSTargets.ProtoReflect.Descriptor instead.

func (*RDSTargets) GetFilter added in v0.10.5

func (x *RDSTargets) GetFilter() []*proto1.Filter

func (*RDSTargets) GetIpConfig added in v0.10.5

func (x *RDSTargets) GetIpConfig() *proto1.IPConfig

func (*RDSTargets) GetRdsServerOptions added in v0.11.4

func (x *RDSTargets) GetRdsServerOptions() *proto.ClientConf_ServerOptions

func (*RDSTargets) GetResourcePath added in v0.10.5

func (x *RDSTargets) GetResourcePath() string

func (*RDSTargets) ProtoMessage added in v0.10.5

func (*RDSTargets) ProtoMessage()

func (*RDSTargets) ProtoReflect added in v0.11.4

func (x *RDSTargets) ProtoReflect() protoreflect.Message

func (*RDSTargets) Reset added in v0.10.5

func (x *RDSTargets) Reset()

func (*RDSTargets) String added in v0.10.5

func (x *RDSTargets) String() string

type TargetsDef

type TargetsDef struct {

	// Types that are assignable to Type:
	//
	//	*TargetsDef_HostNames
	//	*TargetsDef_SharedTargets
	//	*TargetsDef_GceTargets
	//	*TargetsDef_RdsTargets
	//	*TargetsDef_FileTargets
	//	*TargetsDef_K8S
	//	*TargetsDef_DummyTargets
	Type isTargetsDef_Type `protobuf_oneof:"type"`
	// Static endpoints. These endpoints are merged with the resources returned
	// by the targets type above.
	// Example:
	//
	//	endpoint {
	//	  name: "service-gtwy-1"
	//	  ip: "10.1.18.121"
	//	  port: 8080
	//	  labels {
	//	    key: "service"
	//	    value: "products-service"
	//	  }
	//	}
	//	endpoint {
	//	  name: "frontend-url1"
	//	  url: "https://frontend.example.com/url1"
	//	}
	Endpoint []*Endpoint `protobuf:"bytes,23,rep,name=endpoint" json:"endpoint,omitempty"`
	// Regex to apply on the targets.
	Regex *string `protobuf:"bytes,21,opt,name=regex" json:"regex,omitempty"`
	// Exclude lameducks. Lameduck targets can be set through RTC (realtime
	// configurator) service. This functionality works only if lame_duck_options
	// are specified.
	ExcludeLameducks *bool `protobuf:"varint,22,opt,name=exclude_lameducks,json=excludeLameducks,def=1" json:"exclude_lameducks,omitempty"`
	// Provide a dns resolver override instead of using the default dns resolver.
	DnsServer *string `protobuf:"bytes,37,opt,name=dns_server,json=dnsServer" json:"dns_server,omitempty"`
	// contains filtered or unexported fields
}

func (*TargetsDef) Descriptor deprecated

func (*TargetsDef) Descriptor() ([]byte, []int)

Deprecated: Use TargetsDef.ProtoReflect.Descriptor instead.

func (*TargetsDef) GetDnsServer added in v0.13.4

func (x *TargetsDef) GetDnsServer() string

func (*TargetsDef) GetDummyTargets

func (x *TargetsDef) GetDummyTargets() *DummyTargets

func (*TargetsDef) GetEndpoint added in v0.13.2

func (x *TargetsDef) GetEndpoint() []*Endpoint

func (*TargetsDef) GetExcludeLameducks

func (x *TargetsDef) GetExcludeLameducks() bool

func (*TargetsDef) GetFileTargets added in v0.11.4

func (x *TargetsDef) GetFileTargets() *proto3.TargetsConf

func (*TargetsDef) GetGceTargets

func (x *TargetsDef) GetGceTargets() *proto2.TargetsConf

func (*TargetsDef) GetHostNames

func (x *TargetsDef) GetHostNames() string

func (*TargetsDef) GetK8S added in v0.12.4

func (x *TargetsDef) GetK8S() *K8STargets

func (*TargetsDef) GetRdsTargets

func (x *TargetsDef) GetRdsTargets() *RDSTargets

func (*TargetsDef) GetRegex

func (x *TargetsDef) GetRegex() string

func (*TargetsDef) GetSharedTargets added in v0.10.5

func (x *TargetsDef) GetSharedTargets() string

func (*TargetsDef) GetType

func (m *TargetsDef) GetType() isTargetsDef_Type

func (*TargetsDef) ProtoMessage

func (*TargetsDef) ProtoMessage()

func (*TargetsDef) ProtoReflect added in v0.11.4

func (x *TargetsDef) ProtoReflect() protoreflect.Message

func (*TargetsDef) Reset

func (x *TargetsDef) Reset()

func (*TargetsDef) String

func (x *TargetsDef) String() string

type TargetsDef_DummyTargets

type TargetsDef_DummyTargets struct {
	// Empty targets to meet the probe definition requirement where there are
	// actually no targets, for example in case of some external probes.
	DummyTargets *DummyTargets `protobuf:"bytes,20,opt,name=dummy_targets,json=dummyTargets,oneof"`
}

type TargetsDef_FileTargets added in v0.11.4

type TargetsDef_FileTargets struct {
	// File based targets.
	// Example:
	//
	//	file_targets {
	//	  file_path: "/var/run/cloudprober/vips.textpb"
	//	}
	FileTargets *proto3.TargetsConf `protobuf:"bytes,4,opt,name=file_targets,json=fileTargets,oneof"`
}

type TargetsDef_GceTargets

type TargetsDef_GceTargets struct {
	// GCE targets: instances and forwarding_rules, for example:
	//
	//	gce_targets {
	//	  instances {}
	//	}
	GceTargets *proto2.TargetsConf `protobuf:"bytes,2,opt,name=gce_targets,json=gceTargets,oneof"`
}

type TargetsDef_HostNames

type TargetsDef_HostNames struct {
	// Static host names, for example:
	// host_name: "www.google.com,8.8.8.8,en.wikipedia.org"
	HostNames string `protobuf:"bytes,1,opt,name=host_names,json=hostNames,oneof"`
}

type TargetsDef_K8S added in v0.12.4

type TargetsDef_K8S struct {
	// K8s targets.
	// Note: k8s targets are still in the experimental phase. Their config API
	// may change in the future.
	// Example:
	//
	//	k8s {
	//	  namespace: "qa"
	//	  labelSelector: "k8s-app"
	//	  services: ""
	//	}
	K8S *K8STargets `protobuf:"bytes,6,opt,name=k8s,oneof"`
}

type TargetsDef_RdsTargets

type TargetsDef_RdsTargets struct {
	// ResourceDiscovery service based targets.
	// Example:
	//
	//	rds_targets {
	//	  resource_path: "gcp://gce_instances/{{.project}}"
	//	  filter {
	//	    key: "name"
	//	    value: ".*backend.*"
	//	  }
	//	}
	RdsTargets *RDSTargets `protobuf:"bytes,3,opt,name=rds_targets,json=rdsTargets,oneof"`
}

type TargetsDef_SharedTargets added in v0.10.5

type TargetsDef_SharedTargets struct {
	// Shared targets are accessed through their names.
	// Example:
	//
	//	shared_targets {
	//	  name:"backend-vms"
	//	  targets {
	//	    rds_targets {
	//	      ..
	//	    }
	//	  }
	//	}
	//
	//	probe {
	//	  targets {
	//	    shared_targets: "backend-vms"
	//	  }
	//	}
	SharedTargets string `protobuf:"bytes,5,opt,name=shared_targets,json=sharedTargets,oneof"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL