gcp

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2024 License: Apache-2.0 Imports: 10 Imported by: 1

Documentation

Index

Constants

View Source
const (
	DefaultEnvPrefix = "OPENCLARITY_GCP"
)

Variables

View Source
var (
	DefaultScannerMachineArchitectureToTypeMapping = apitypes.FromArchitectureMapping{
		"x86_64": "e2-standard-2",
		"arm64":  "t2a-standard-2",
	}

	DefaultScannerSourceImagePrefix                       = "projects/ubuntu-os-cloud/global/images/"
	DefaultScannerMachineArchitectureToSourceImageMapping = apitypes.FromArchitectureMapping{
		"x86_64": "ubuntu-2204-jammy-v20230630",
		"arm64":  "ubuntu-2204-jammy-arm64-v20230630",
	}
)

Functions

This section is empty.

Types

type Config

type Config struct {
	ProjectID                                      string                           `mapstructure:"project_id"`
	ScannerZone                                    string                           `mapstructure:"scanner_zone"`
	ScannerSubnetwork                              string                           `mapstructure:"scanner_subnetwork"`
	ScannerMachineArchitectureToTypeMapping        apitypes.FromArchitectureMapping `mapstructure:"scanner_machine_architecture_to_type_mapping"`
	ScannerMachineArchitecture                     apitypes.VMInfoArchitecture      `mapstructure:"scanner_machine_architecture"`
	ScannerSourceImagePrefix                       string                           `mapstructure:"scanner_source_image_prefix"`
	ScannerMachineArchitectureToSourceImageMapping apitypes.FromArchitectureMapping `mapstructure:"scanner_machine_architecture_to_source_image_mapping"`
	ScannerSSHPublicKey                            string                           `mapstructure:"scanner_ssh_public_key"`
}

func NewConfig

func NewConfig() (*Config, error)

func (Config) Validate

func (c Config) Validate() error

nolint:cyclop

type Provider

type Provider struct {
	*discoverer.Discoverer
	*scanner.Scanner
	*estimator.Estimator
}

func New

func New(ctx context.Context) (*Provider, error)

func (*Provider) Kind

func (p *Provider) Kind() apitypes.CloudProvider

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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