discovery

package
v0.0.0-...-5c79d48 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2024 License: AGPL-3.0 Imports: 43 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// CloudClients is an interface for retrieving cloud clients.
	CloudClients cloud.Clients
	// IntegrationOnlyCredentials discards any Matcher that don't have an Integration.
	// When true, ambient credentials (used by the Cloud SDKs) are not used.
	IntegrationOnlyCredentials bool
	// KubernetesClient is the Kubernetes client interface
	KubernetesClient kubernetes.Interface
	// Matchers stores all types of matchers to discover resources
	Matchers Matchers
	// Emitter is events emitter, used to submit discrete events
	Emitter apievents.Emitter
	// AccessPoint is a discovery access point
	AccessPoint auth.DiscoveryAccessPoint
	// Log is the logger.
	Log logrus.FieldLogger

	// DiscoveryGroup is the name of the discovery group that the current
	// discovery service is a part of.
	// It is used to filter out discovered resources that belong to another
	// discovery services. When running in high availability mode and the agents
	// have access to the same cloud resources, this field value must be the same
	// for all discovery services. If different agents are used to discover different
	// sets of cloud resources, this field must be different for each set of agents.
	DiscoveryGroup string
	// ClusterName is the name of the Teleport cluster.
	ClusterName string
	// PollInterval is the cadence at which the discovery server will run each of its
	// discovery cycles.
	PollInterval time.Duration

	// ServerCredentials are the credentials used to identify the discovery service
	// to the Access Graph service.
	ServerCredentials *tls.Config
	// AccessGraphConfig is the configuration for the Access Graph client
	AccessGraphConfig servicecfg.AccessGraphConfig

	// TriggerFetchC is a list of channels that must be notified when a off-band poll must be performed.
	// This is used to start a polling iteration when a new DiscoveryConfig change is received.
	TriggerFetchC []chan struct{}
	// contains filtered or unexported fields
}

Config provides configuration for the discovery server.

func (*Config) CheckAndSetDefaults

func (c *Config) CheckAndSetDefaults() error

type Matchers

type Matchers struct {
	// AWS is a list of AWS EC2 matchers.
	AWS []types.AWSMatcher
	// Azure is a list of Azure matchers to discover resources.
	Azure []types.AzureMatcher
	// GCP is a list of GCP matchers to discover resources.
	GCP []types.GCPMatcher
	// Kubernetes is a list of Kubernetes matchers to discovery resources.
	Kubernetes []types.KubernetesMatcher
	// AccessGraph is the configuration for the Access Graph Cloud sync.
	AccessGraph *types.AccessGraphSync
}

Matchers contains all matchers used by discovery service

func (Matchers) IsEmpty

func (m Matchers) IsEmpty() bool

type Server

type Server struct {
	*Config
	// contains filtered or unexported fields
}

Server is a discovery server, used to discover cloud resources for inclusion in Teleport

func New

func New(ctx context.Context, cfg *Config) (*Server, error)

New initializes a discovery Server

func (*Server) Start

func (s *Server) Start() error

Start starts the discovery service.

func (*Server) Stop

func (s *Server) Stop()

Stop stops the discovery service.

func (*Server) Wait

func (s *Server) Wait() error

Wait will block while the server is running.

Directories

Path Synopsis
db

Jump to

Keyboard shortcuts

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