Documentation ¶
Overview ¶
Package targets provides the means to list and resolve targets for probers in the cloudprober framework. To learn more about the kinds of targets available, first look at the "targets.proto" to see how targets are configured.
The interface targets.Targets is what actually provides the ability to list targets (or, more generally, resources), and is what is used by probers. The targets.New constructor provides a specific Target implementation that wraps filtering functionality over a core target lister.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterTargetsType ¶
func RegisterTargetsType(extensionFieldNo int, newTargetsFunc func(interface{}, *logger.Logger) (Targets, error))
RegisterTargetsType registers a new targets type. New targets types are integrated with the config subsystem using the protobuf extensions.
TODO(manugarg): Add a full example of using extensions.
Types ¶
type Targets ¶
type Targets interface {
// contains filtered or unexported methods
}
Targets are able to list and resolve targets with their List and Resolve methods. A single instance of Targets represents a specific listing method --- if multiple sets of resources need to be listed/resolved, a separate instance of Targets will be needed.
func New ¶
func New(targetsDef *targetspb.TargetsDef, ldLister lameduck.Lister, targetOpts *targetspb.GlobalTargetsOptions, globalLogger, l *logger.Logger) (Targets, error)
New returns an instance of Targets as defined by a Targets protobuf (and a GlobalTargetsOptions protobuf). The Targets instance returned will filter a core target lister (i.e. static host-list, GCE instances, GCE forwarding rules, RTC targets) by an optional regex or with the lameduck mechanism.
All information related to creating the Target instance will be logged to globalLogger. The logger "l" will be given to the new Targets instance for future logging. If "l" is not provided, a default instance will be given.
See cloudprober/targets/targets.proto for more information on the possible configurations of Targets.
func StaticTargets ¶
StaticTargets returns a basic "targets" object (implementing the targets interface) from a comma-separated list of hosts. This function is specially useful if you want to get a valid targets object without an associated TargetDef protobuf (for example for testing).
Directories ¶
Path | Synopsis |
---|---|
Package gce implements Google Compute Engine (GCE) targets for Cloudprober.
|
Package gce implements Google Compute Engine (GCE) targets for Cloudprober. |
Package lameduck implements a lameducks provider.
|
Package lameduck implements a lameducks provider. |
rds
|
|
client
Package client implements a ResourceDiscovery service (RDS) client.
|
Package client implements a ResourceDiscovery service (RDS) client. |
client/cmd
This binary implements a standalone ResourceDiscovery service (RDS) client.
|
This binary implements a standalone ResourceDiscovery service (RDS) client. |
server
Package server provides a ResourceDiscovery gRPC server implementation.
|
Package server provides a ResourceDiscovery gRPC server implementation. |
server/cmd
This binary implements a stand-alone ResourceDiscovery server.
|
This binary implements a stand-alone ResourceDiscovery server. |
server/filter
Package filter implements common filters for the RDS (resource discovery service) providers.
|
Package filter implements common filters for the RDS (resource discovery service) providers. |
server/gcp
Package gcp implements a GCP (Google Compute Platform) resources provider for ResourceDiscovery server.
|
Package gcp implements a GCP (Google Compute Platform) resources provider for ResourceDiscovery server. |
Package resolver provides a caching, non-blocking DNS resolver.
|
Package resolver provides a caching, non-blocking DNS resolver. |
Package rtc implements runtime-configurator (RTC) based targets.
|
Package rtc implements runtime-configurator (RTC) based targets. |
rtcreporter
Package rtcreporter implements a reporting mechanism for RTC targets.
|
Package rtcreporter implements a reporting mechanism for RTC targets. |
rtcservice
Package rtcservice provides utility functions for the cloudprober project used when dealing with the Runtime Configurator API.
|
Package rtcservice provides utility functions for the cloudprober project used when dealing with the Runtime Configurator API. |