fetchers

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: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAKSFetcher

func NewAKSFetcher(cfg AKSFetcherConfig) (common.Fetcher, error)

NewAKSFetcher creates a new AKS fetcher configuration.

func NewEKSFetcher

func NewEKSFetcher(cfg EKSFetcherConfig) (common.Fetcher, error)

NewEKSFetcher creates a new EKS fetcher configuration.

func NewGKEFetcher

func NewGKEFetcher(cfg GKEFetcherConfig) (common.Fetcher, error)

NewGKEFetcher creates a new GKE fetcher configuration.

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 EKSClientGetter

type EKSClientGetter interface {
	// GetAWSEKSClient returns AWS EKS client for the specified region.
	GetAWSEKSClient(ctx context.Context, region string, opts ...cloud.AWSAssumeRoleOptionFn) (eksiface.EKSAPI, error)
}

EKSClientGetter is an interface for getting an EKS client.

type EKSFetcherConfig

type EKSFetcherConfig struct {
	// EKSClientGetter retrieves an EKS client.
	EKSClientGetter EKSClientGetter
	// AssumeRole provides a role ARN and ExternalID to assume an AWS role
	// when fetching clusters.
	AssumeRole types.AssumeRole
	// 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 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.

type KubeAppFetcher

type KubeAppFetcher struct {
	KubeAppsFetcherConfig
}

KubeAppFetcher fetches app resources from Kubernetes services

func NewKubeAppsFetcher

func NewKubeAppsFetcher(cfg KubeAppsFetcherConfig) (*KubeAppFetcher, error)

NewKubeAppsFetcher creates new Kubernetes app fetcher

func (*KubeAppFetcher) Cloud

func (f *KubeAppFetcher) Cloud() string

func (*KubeAppFetcher) FetcherType

func (f *KubeAppFetcher) FetcherType() string

func (*KubeAppFetcher) Get

Get fetches Kubernetes apps from the cluster

func (*KubeAppFetcher) ResourceType

func (f *KubeAppFetcher) ResourceType() string

func (*KubeAppFetcher) String

func (f *KubeAppFetcher) String() string

type KubeAppsFetcherConfig

type KubeAppsFetcherConfig struct {
	// Name of the kubernetes cluster
	ClusterName string
	// KubernetesClient is a client for Kubernetes API
	KubernetesClient kubernetes.Interface
	// FilterLabels are the filter criteria.
	FilterLabels types.Labels
	// Namespaces are the kubernetes namespaces in which to discover services
	Namespaces []string
	// Log is a logger to use
	Log logrus.FieldLogger
	// ProtocolChecker inspects port to find your whether they are HTTP/HTTPS or not.
	ProtocolChecker ProtocolChecker
}

KubeAppsFetcherConfig configures KubeAppFetcher

func (*KubeAppsFetcherConfig) CheckAndSetDefaults

func (k *KubeAppsFetcherConfig) CheckAndSetDefaults() error

CheckAndSetDefaults validates and sets the defaults values.

type ProtoChecker

type ProtoChecker struct {
	InsecureSkipVerify bool
	// contains filtered or unexported fields
}

func NewProtoChecker

func NewProtoChecker(insecureSkipVerify bool) *ProtoChecker

func (*ProtoChecker) CheckProtocol

func (p *ProtoChecker) CheckProtocol(uri string) string

type ProtocolChecker

type ProtocolChecker interface {
	CheckProtocol(uri string) string
}

ProtocolChecker is an interface used to check what protocol uri serves

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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