parameters

package
v0.1.40 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultParameterGroup = "default:2025-08-27"

Variables

This section is empty.

Functions

func ValidateParameterValue

func ValidateParameterValue(value, valueType string) error

ValidateParameterValue validates a parameter value against its type

Types

type ExpressionContext

type ExpressionContext struct {
	DBContainerMemoryMB  int
	DBContainerCoreCount int
	MaxConnections       int
}

type Parameter

type Parameter struct {
	GroupName string `db:"group_name" json:"groupName"`
	Name      string `db:"name" json:"name"`
	Type      string `db:"type" json:"type"`
	ValueType string `db:"value_type" json:"valueType"`
	Value     string `db:"value" json:"value"`
	CreatedAt string `db:"created_at" json:"createdAt"`
}

func GetDefaultParameters

func GetDefaultParameters() []Parameter

GetDefaultParameters returns the default parameter configuration for PostgreSQL instances. This function acts as a constant by always returning the same configuration.

type ParameterGroup

type ParameterGroup struct {
	Name       string      `json:"name"`
	Parameters []Parameter `json:"parameters"`
}

type ParameterStore

type ParameterStore struct {
	// contains filtered or unexported fields
}

func NewParameterStore

func NewParameterStore(db *sqlx.DB) *ParameterStore

func (*ParameterStore) CreateGroup

func (s *ParameterStore) CreateGroup(groupName string, parameters []Parameter) error

func (*ParameterStore) DeleteGroup

func (s *ParameterStore) DeleteGroup(groupName string) error

func (*ParameterStore) EnsureDefaultParameterGroup

func (s *ParameterStore) EnsureDefaultParameterGroup() error

func (*ParameterStore) GetGroup

func (s *ParameterStore) GetGroup(groupName string) (*ParameterGroup, error)

func (*ParameterStore) GroupExists

func (s *ParameterStore) GroupExists(groupName string) (bool, error)

func (*ParameterStore) ListGroups

func (s *ParameterStore) ListGroups() ([]string, error)

func (*ParameterStore) ResolveParameterGroup

func (s *ParameterStore) ResolveParameterGroup(groupName string, coreCount, memoryMB int) ([]ResolvedParameter, error)

type ResolvedParameter

type ResolvedParameter struct {
	Name      string `json:"name"`
	Type      string `json:"type"`
	ValueType string `json:"valueType"`
	Value     string `json:"value"`
}

func ResolveParameters

func ResolveParameters(parameters []Parameter, coreCount, memoryMB int) ([]ResolvedParameter, error)

ResolveParameters resolves a list of parameters with the given system resources This function is decoupled from the store for easier testing

Jump to

Keyboard shortcuts

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