loader

package
v0.0.0-...-2215086 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2023 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 CloudInfoLoader

type CloudInfoLoader interface {
	LoadRegions()
	LoadZones(provider string, service string, region Region)
	LoadVersions(provider string, service string, region Region)
	LoadImages(provider string, service string, region Region)
	LoadVms(provider string, service string, region Region)
	Load()
}

CloudInfoLoader operations for loading cloud information into the cloud info application Add specialized implementations for different information sources

func NewCloudInfoLoader

func NewCloudInfoLoader(datapath, datafile, datatype string, store cloudinfo.CloudInfoStore, log cloudinfo.Logger,
	eventBus messaging.EventBus) CloudInfoLoader

type Config

type Config struct {
	// the location of the yaml(s) defining services for providers
	ServiceConfigLocation string

	// the name of the file with the data
	ServiceConfigName string

	// the format of the data file (json / yaml)
	Format string
}

type ImageData

type ImageData struct {
	Strategy string
	Data     []types.Image
}

type Region

type Region struct {
	Name string
	Id   string
	Data RegionData
}

type RegionData

type RegionData struct {
	Zones    ZoneData
	Images   ImageData
	Versions VersionData
	Vms      VmData
}

type Service

type Service struct {
	Name         string
	IsStatic     bool
	Source       string
	DataLocation string
	DataFile     string
	DataType     string
}

type ServiceData

type ServiceData struct {
	// embedded service
	Service  `mapstructure:",squash"`
	Provider string
	Regions  []Region
}

ServiceData service data representation corresponding to the data to parsed from the external yaml / json

type ServiceManager

type ServiceManager interface {
	// ConfigureServices parses the service configuration file and registers supported services
	ConfigureServices(providers []string, distributionConfig distribution.Config)

	// LoadServiceInformation triggers importing cloud information based on the available service information
	LoadServiceInformation(providers []string)
}

ServiceManager abstracts the operations related to cloud info services

func NewDefaultServiceManager

func NewDefaultServiceManager(config Config, store cloudinfo.CloudInfoStore, log cloudinfo.Logger, eventBus messaging.EventBus) ServiceManager

type VersionData

type VersionData struct {
	Strategy string
	Data     []types.LocationVersion
}

type VmData

type VmData struct {
	Strategy string
	Data     []types.VMInfo
}

func (VmData) ContainsVM

func (wmd VmData) ContainsVM(VMType string) bool

type ZoneData

type ZoneData struct {
	Strategy string
	Data     []string
}

Jump to

Keyboard shortcuts

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