provider

package
v0.0.0-...-f99419a Latest Latest
Warning

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

Go to latest
Published: May 4, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterProvider

func RegisterProvider(name string, provider Factory) error

Types

type Config

type Config struct {
	PollInterval    time.Duration `kong:"help='Interval at which metrics are fetch.',env='PROVIDER_POLLINTERVAL',required=false,default='5m'"`
	PollMaxInterval time.Duration `kong:"help='maximum Interval at which metrics are fetch.',env='PROVIDER_POLLMAXINTERVAL',required=false,default='15m'"`
	PollingDuration time.Duration `kong:"help='Time limit for requests made by the provider client.',env='PROVIDER_POLLDURATION',required=false,default='5m'"`
	Workers         int           `kong:"help='Number of workers to fetch metrics.',env='PROVIDER_WORKERS',required=true,default=10"`
	Buffer          int           `kong:"help='Number of cluster that the buffer can have.',env='PROVIDER_BUFFER',required=true,default=100"`
	MaxRetries      int           `` /* 229-byte string literal not displayed */

	// ClusterChannel define the channel to exchange clusters information with Gardener controller.
	ClusterChannel chan *gardener.Cluster `kong:"-"`
	// EventsChannel define the channel to exchange events with EDP.
	EventsChannel chan<- *edp.Event `kong:"-"`
	// logger is the standard logger for the provider.
	Logger log.Logger `kong:"-"`
}

Config holds providers base configuration.

type Factory

type Factory func(config *Config) Provider

Factory generates a Provider.

type Provider

type Provider interface {
	Run(ctx context.Context)
}

Provider interface contains all behaviors for a provider.

func NewProvider

func NewProvider(name string, config *Config) (Provider, error)

NewProvider returns a registered provider base on the type.

type SecretMap

type SecretMap interface {
	// contains filtered or unexported methods
}

SecretMap is the interface that provides a method to decode kubenertes secrets into a Provider custom structure.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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