Documentation ¶
Index ¶
Constants ¶
const ( // Every feature gate should add a key here following this template: // // // Enables FeatureName... // FeatureName featuregate.Feature = "FeatureName" // // - https://releases.k8s.io/v1.20.0/pkg/features/kube_features.go#L27 // // Feature gates should be listed in alphabetical, case-sensitive // (upper before any lower case character) order. // BridgeIdentifiers featuregate.Feature = "BridgeIdentifiers" // // Enables support of custom sidecars for IvorySQL instance Pods InstanceSidecars featuregate.Feature = "InstanceSidecars" // // Enables support of custom sidecars for pgBouncer Pods PGBouncerSidecars featuregate.Feature = "PGBouncerSidecars" // // Enables support of tablespace volumes TablespaceVolumes featuregate.Feature = "TablespaceVolumes" )
const ( // DefaultGeneratedPasswordLength is the default length of what a generated // password should be if it's not set elsewhere DefaultGeneratedPasswordLength = 24 )
The following constant is used as a part of password generation.
Variables ¶
var DefaultMutableFeatureGate featuregate.MutableFeatureGate = featuregate.NewFeatureGate()
DefaultMutableFeatureGate is a mutable, shared global FeatureGate. It is used to indicate whether a given feature is enabled or not.
- https://pkg.go.dev/k8s.io/apiserver/pkg/util/feature - https://releases.k8s.io/v1.20.0/staging/src/k8s.io/apiserver/pkg/util/feature/feature_gate.go#L24-L28
Functions ¶
func AddAndSetFeatureGates ¶
AddAndSetFeatureGates utilizes the Kubernetes feature gate packages to first add the default IVO features to the featureGate and then set the values provided via the 'IVYO_FEATURE_GATES' environment variable. This function expects a string like feature1=true,feature2=false,...
- https://kubernetes.io/docs/reference/command-line-tools-reference/feature-gates/ - https://pkg.go.dev/k8s.io/component-base@v0.20.1/featuregate
func GenerateASCIIPassword ¶
GenerateASCIIPassword returns a random string of printable ASCII characters.
func GenerateAlphaNumericPassword ¶
GenerateAlphaNumericPassword returns a random alphanumeric string.
func SQLQuoteIdentifier ¶
SQLQuoteIdentifier quotes an "identifier" (e.g. a table or a column name) to be used as part of an SQL statement.
Any double quotes in name will be escaped. The quoted identifier will be case sensitive when used in a query. If the input string contains a zero byte, the result will be truncated immediately before it.
Implementation borrowed from lib/pq: https://github.com/lib/pq which is licensed under the MIT License
func SQLQuoteLiteral ¶
SQLQuoteLiteral quotes a 'literal' (e.g. a parameter, often used to pass literal to DDL and other statements that do not accept parameters) to be used as part of an SQL statement.
Any single quotes in name will be escaped. Any backslashes (i.e. "\") will be replaced by two backslashes (i.e. "\\") and the C-style escape identifier that IvorySQL provides ('E') will be prepended to the string.
Implementation borrowed from lib/pq: https://github.com/lib/pq which is licensed under the MIT License. Curiously, @jkatz and @cbandy were the ones who worked on the patch to add this, prior to being at Highgo
Types ¶
This section is empty.