fetchers

package
v11.3.3 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2022 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AKSFetcherConfig

type AKSFetcherConfig struct {
	// Client is the Azure AKS client.
	Client azure.AKSClient
	// Regions are the regions where the clusters should be located.
	Regions []string
	// ResourceGroups are the Azure resource groups the clusters must belong to.
	ResourceGroups []string
	// FilterLabels are the filter criteria.
	FilterLabels types.Labels
	// Log is the logger.
	Log logrus.FieldLogger
}

AKSFetcherConfig configures the AKS fetcher.

func (*AKSFetcherConfig) CheckAndSetDefaults

func (c *AKSFetcherConfig) CheckAndSetDefaults() error

CheckAndSetDefaults validates and sets the defaults values.

type EKSFetcherConfig

type EKSFetcherConfig struct {
	// Client is the AWS eKS client.
	Client eksiface.EKSAPI
	// Region is the region where the clusters should be located.
	Region string
	// FilterLabels are the filter criteria.
	FilterLabels types.Labels
	// Log is the logger.
	Log logrus.FieldLogger
}

EKSFetcherConfig configures the EKS fetcher.

func (*EKSFetcherConfig) CheckAndSetDefaults

func (c *EKSFetcherConfig) CheckAndSetDefaults() error

CheckAndSetDefaults validates and sets the defaults values.

type Fetcher

type Fetcher interface {
	// Get returns the list of resources from the cloud after applying the filters.
	Get(ctx context.Context) (types.ResourcesWithLabels, error)
	// ResourceType identifies the resource type the fetcher is returning.
	ResourceType() string
	// Cloud returns the cloud the fetcher is operating.
	Cloud() string
}

Fetcher defines the common methods across all fetchers.

func NewAKSFetcher

func NewAKSFetcher(cfg AKSFetcherConfig) (Fetcher, error)

NewAKSFetcher creates a new AKS fetcher configuration.

func NewEKSFetcher

func NewEKSFetcher(cfg EKSFetcherConfig) (Fetcher, error)

NewEKSFetcher creates a new EKS fetcher configuration.

func NewGKEFetcher

func NewGKEFetcher(cfg GKEFetcherConfig) (Fetcher, error)

NewGKEFetcher creates a new GKE fetcher configuration.

type GKEFetcherConfig

type GKEFetcherConfig struct {
	// Client is the GCP GKE client.
	Client gcp.GKEClient
	// ProjectID is the projectID the cluster should belong to.
	ProjectID string
	// Location is the GCP's location where the clusters should be located.
	// Wildcard "*" is supported.
	Location string
	// FilterLabels are the filter criteria.
	FilterLabels types.Labels
	// Log is the logger.
	Log logrus.FieldLogger
}

GKEFetcherConfig configures the GKE fetcher.

func (*GKEFetcherConfig) CheckAndSetDefaults

func (c *GKEFetcherConfig) CheckAndSetDefaults() error

CheckAndSetDefaults validates and sets the defaults values.

Jump to

Keyboard shortcuts

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