process

package
v0.0.0-...-e2054a2 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2024 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Azure = "azure"
	AWS   = "aws"
	GCP   = "gcp"
	CCEE  = "sapconvergedcloud"
)

Variables

View Source
var (
	ErrLoadingFailed = errors.New("could not load resource")
)

Functions

This section is empty.

Types

type AWSMachines

type AWSMachines map[string]Feature

type AzureMachines

type AzureMachines map[string]Feature

type EventStream

type EventStream struct {
	KubeConfig string
	Metric     edp.ConsumptionMetrics
}

type Feature

type Feature struct {
	CpuCores int     `json:"cpu_cores"`
	Memory   float64 `json:"memory"`
	Storage  int     `json:"storage,omitempty"`
	MaxNICs  int     `json:"max_nics,omitempty"`
}

type GCPMachines

type GCPMachines map[string]Feature

type Input

type Input struct {
	// contains filtered or unexported fields
}

func (Input) Parse

func (inp Input) Parse(providers *Providers) (*edp.ConsumptionMetrics, error)

type MachineInfo

type MachineInfo map[string]json.RawMessage

type OpenStackMachines

type OpenStackMachines map[string]Feature

type Process

type Process struct {
	KEBClient         *keb.Client
	EDPClient         *edp.Client
	Queue             workqueue.DelayingInterface
	SecretCacheClient v1.CoreV1Interface
	Cache             *cache.Cache
	Providers         *Providers
	ScrapeInterval    time.Duration
	WorkersPoolSize   int
	NodeConfig        skrnode.ConfigInf
	PVCConfig         skrpvc.ConfigInf
	SvcConfig         skrsvc.ConfigInf
	Logger            *zap.SugaredLogger
}

func (*Process) Start

func (p *Process) Start()

Start runs the complete process of collection and sending metrics.

type Providers

type Providers struct {
	Azure     AzureMachines
	AWS       AWSMachines
	GCP       GCPMachines
	OpenStack OpenStackMachines
}

func LoadPublicCloudSpecs

func LoadPublicCloudSpecs(cfg *env.Config) (*Providers, error)

LoadPublicCloudSpecs loads string data to Providers object from an env var

func (Providers) GetFeature

func (p Providers) GetFeature(cloudProvider, vmType string) (f *Feature)

Jump to

Keyboard shortcuts

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