provider

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: May 17, 2022 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 Engine

type Engine struct {
	Providers []Provider
	datastore.Datastore
}

Engine configures and starts the providers

func NewEngine

func NewEngine(ctx context.Context, cfg config.Config, datastore datastore.Datastore) (Engine, error)

Setup the providers, make sure configuration is valid

func (*Engine) Run

func (e *Engine) Run(ctx context.Context) error

Run the providers: fetches data about cloud resources and save them to store

type Provider

type Provider interface {
	GetMapper() mapper.Mapper
	Region() string
}

Provider is an interface to be implemented for a cloud provider to fetch resources The provider must provide a mapping configuration which references the methods to fetch the resources. These methods need to be implemented and they will be called by a Mapper using reflection.

func NewProvider

func NewProvider(ctx context.Context, config config.Provider, logger *zap.Logger) (Provider, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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