config

package
v1.24.2 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2024 License: Apache-2.0 Imports: 11 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package config contains the code related to the generation of the PgBouncer configuration

Index

Constants

View Source
const (
	// ConfigsDir is the directory in which all pgbouncer configurations are
	ConfigsDir = postgres.ScratchDataDirectory + "/configs"

	// PgBouncerIniFileName is the name of PgBouncer configuration file
	PgBouncerIniFileName = "pgbouncer.ini"
	// PgBouncerHBAConfFileName is the name of PgBouncer Host Based Authentication file
	PgBouncerHBAConfFileName = "pg_hba.conf"
	// PgBouncerUserListFileName is the name of PgBouncer user list file
	PgBouncerUserListFileName = "userlist.txt"
	// PgBouncerAdminUser is the default admin user for pgbouncer
	PgBouncerAdminUser = "pgbouncer"
	// PgBouncerSocketDir is the directory in which pgbouncer socket is
	PgBouncerSocketDir = postgres.SocketDirectory
	// PgBouncerPort is the port where pgbouncer will be listening
	PgBouncerPort = 5432
	// PgBouncerPortName is the name of the port where pgbouncer will be listening
	PgBouncerPortName = "pgbouncer"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ConfigurationFiles

type ConfigurationFiles map[string][]byte

ConfigurationFiles is a set of configuration files that are needed for pgbouncer to work

func BuildConfigurationFiles

func BuildConfigurationFiles(pooler *apiv1.Pooler, secrets *Secrets) (ConfigurationFiles, error)

BuildConfigurationFiles create the config files containing the pgbouncer configuration and the users file

type ErrorUnknownSecretType

type ErrorUnknownSecretType struct {
	DeclaredType corev1.SecretType
	Keys         []string
}

ErrorUnknownSecretType is raised when the detection of a Secret type failed

func NewErrorUnknownSecretType

func NewErrorUnknownSecretType(secret *corev1.Secret) *ErrorUnknownSecretType

NewErrorUnknownSecretType returns a new error structure from the content of a secret

func (*ErrorUnknownSecretType) Error

func (e *ErrorUnknownSecretType) Error() string

Error implements the error interface

type Secrets

type Secrets struct {
	// The secret containing the credentials to be used to execute the auth_query queries.
	AuthQuery *corev1.Secret

	// The TLS secret that will be used for client connections (application-side)
	Client *corev1.Secret

	// The root-CA that will be used to validate client certificates
	ClientCA *corev1.Secret

	// The CA that will be used to validate the connections to PostgreSQL
	ServerCA *corev1.Secret
}

Secrets is the set of data that is needed to compute a PgBouncer configuration

Jump to

Keyboard shortcuts

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