provider

package
v0.0.0-...-ddad2a0 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CloudProviderType

type CloudProviderType int
const (
	AWS CloudProviderType = iota
	AZURE
	GCP
)

func (CloudProviderType) String

func (p CloudProviderType) String() string

type Config

type Config struct {
	Type             string        `` /* 128-byte string literal not displayed */
	PollInterval     time.Duration `kong:"help='Interval at which metrics are fetch.',env='PROVIDER_POLLINTERVAL',required=true,default='1m'"`
	Workers          int           `kong:"help='Number of workers to fetch metrics.',env='PROVIDER_WORKERS',required=true,default=10"`
	Buffer           int           `kong:"help='Number of accounts that the buffer can have.',env='PROVIDER_BUFFER',required=true,default=100"`
	ClientTraceLevel int           `kong:"help='Provider client trace level (0=disabled, 1=headers, 2=body)',env='PROVIDER_CLIENT_TRACE_LEVEL',default=0"`
}

type Provider

type Provider interface {
	Collect(ctx context.Context, wg *sync.WaitGroup)
}

Provider interface contains all behaviors for a provider.

func NewProvider

func NewProvider(config *Config, accountsChannel chan *gardener.Account, eventsChannel chan<- *[]byte, logger *zap.SugaredLogger) (Provider, error)

NewProvider Create a new provider from the name.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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