hostparams

package
v1.0.4 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	INSTANCE_CLASS_INDEX = 0
	STORAGE_TYPE_INDEX   = 1
	ErrMaxStorageReduced = Error("reducing .spec.MaxStorageGB value is not allowed (Also not spacifying maxStorageGB if specified earlier is not allowed.)")
	ErrMaxStorageLesser  = Error(".spec.MaxStorageGB should always be greater than spec.minStorageGB")
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Error added in v1.0.2

type Error string

func (Error) Error added in v1.0.2

func (e Error) Error() string

type HostParams

type HostParams struct {
	Engine                          string
	Shape                           string
	MinStorageGB                    int
	MaxStorageGB                    int64
	EngineVersion                   string
	MasterUsername                  string
	InstanceClass                   string
	StorageType                     string
	SkipFinalSnapshotBeforeDeletion bool
	PubliclyAccessible              bool
	EnableIAMDatabaseAuthentication bool
	DeletionPolicy                  xpv1.DeletionPolicy
	Port                            int64
	// contains filtered or unexported fields
}

func GetActiveHostParams

func GetActiveHostParams(dbClaim *persistancev1.DatabaseClaim) *HostParams

func New

func New(config *viper.Viper, fragmentKey string, dbClaim *persistancev1.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(np *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