specprovider

package
v0.0.0-...-5d6e387 Latest Latest
Warning

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

Go to latest
Published: May 15, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrInvalidSpecProvider is an error advising an invalid spec provider configuration
	ErrInvalidSpecProvider = fmt.Errorf("invalid configManager spec provider type defined")
	// ErrNoSpecProviderConfig is an error advising no config has been configured
	ErrNoSpecProviderConfig = fmt.Errorf("no configManager spec provider configured")
)

Functions

This section is empty.

Types

type ConfigManager

type ConfigManager struct {
	Source string `yaml:"source"`
}

ConfigManager holds fields that describe a ConfigManager

type ConfigManagerSource

type ConfigManagerSource string

ConfigManagerSource is a type that denotes the source of configuration management

const (
	// OCM denotes OCM as the config manager source
	OCM ConfigManagerSource = "OCM"
	// LOCAL denotes a local config manager source
	LOCAL ConfigManagerSource = "LOCAL"
)

type SpecProvider

type SpecProvider interface {
	Get() ([]upgradev1alpha1.UpgradeConfigSpec, error)
}

SpecProvider is an interface that enables an implementation of a spec provider

type SpecProviderBuilder

type SpecProviderBuilder interface {
	New(client.Client, configmanager.ConfigManagerBuilder) (SpecProvider, error)
}

SpecProviderBuilder is an interface that enables implementation of a spec provider builder

func NewBuilder

func NewBuilder() SpecProviderBuilder

NewBuilder returns a new specProviderBuilder

type SpecProviderConfig

type SpecProviderConfig struct {
	// UpgradeType is used to select which upgrader to use when upgrading
	UpgradeType string `yaml:"upgradeType"`
	// ConfigManager configures the source that the operator uses to read UpgradeConfig specs
	ConfigManager ConfigManager `yaml:"configManager"`
}

SpecProviderConfig holds fields that describe a spec providers config

func (*SpecProviderConfig) GetUpgradeType

func (cfg *SpecProviderConfig) GetUpgradeType() upgradev1alpha1.UpgradeType

GetUpgradeType returns the upgrader type to populate in the upgrade config spec

func (*SpecProviderConfig) IsValid

func (cfg *SpecProviderConfig) IsValid() error

IsValid returns a nil error when the SpecProviderConfig is valid

Directories

Path Synopsis
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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