hostparams

package
v1.10.2 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	INSTANCE_CLASS_INDEX = 0
	STORAGE_TYPE_INDEX   = 1
)
View Source
var (
	ErrMaxStorageReduced         = errors.New("reducing .spec.maxStorageGB value is not allowed (Also not spacifying maxStorageGB if specified earlier is not allowed.)")
	ErrMaxStorageLesser          = errors.New(".spec.maxStorageGB should always be greater than spec.minStorageGB")
	ErrEngineVersionNotSpecified = errors.New(".spec.dbVersion is a mandatory field and cannot be empty")
)

Functions

This section is empty.

Types

type HostParams

type HostParams struct {
	// FIXME: this should be DatabaseType, not string
	Type string

	Shape                           string
	MinStorageGB                    int
	MaxStorageGB                    int64
	DBVersion                       string
	MasterUsername                  string
	InstanceClass                   string
	StorageType                     string
	SkipFinalSnapshotBeforeDeletion bool
	PubliclyAccessible              bool
	EnableIAMDatabaseAuthentication bool
	DeletionPolicy                  xpv1.DeletionPolicy
	Port                            int64

	IsDefaultVersion bool
	// contains filtered or unexported fields
}

func GetActiveHostParams

func GetActiveHostParams(dbClaim *v1.DatabaseClaim) *HostParams

Retrieves the current scenario, wha engine, version, instance, etc. actually is deployed

func New

func New(config *viper.Viper, dbClaim *v1.DatabaseClaim) (*HostParams, error)

func (*HostParams) HasEngineChanged

func (p *HostParams) HasEngineChanged(activeEngine string) bool

func (*HostParams) HasInstanceClassChanged added in v1.0.1

func (p *HostParams) HasInstanceClassChanged(activeInstanceClass string) bool

func (*HostParams) HasShapeChanged

func (p *HostParams) HasShapeChanged(activeShape string) bool

func (*HostParams) HasStorageChanged

func (p *HostParams) HasStorageChanged(activeStorage int) bool

func (*HostParams) HasVersionChanged

func (p *HostParams) HasVersionChanged(activeVersion string) bool

func (*HostParams) Hash

func (p *HostParams) Hash() string

func (*HostParams) IsUpgradeRequested

func (p *HostParams) IsUpgradeRequested(active *HostParams) bool

func (*HostParams) String

func (p *HostParams) String() string

Jump to

Keyboard shortcuts

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