factories

package
v0.5.0-rc.3 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2021 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MySQLUser

func MySQLUser(cluster *mysqlv1alpha1.MysqlCluster, opts ...MySQLUserOption) *mysqluser.MySQLUser

MySQLUser is a helper func that builds a mysql user

func NewDatabase

func NewDatabase(opts ...MysqlDBOption) *mysqldatabase.Database

NewDatabase returns a database object

func NewMySQLCluster

func NewMySQLCluster(opts ...MySQLClusterOption) *mysqlv1alpha1.MysqlCluster

NewMySQLCluster is a helper func that creates a mysql cluster

Types

type MySQLClusterOption

type MySQLClusterOption func(*mysqlv1alpha1.MysqlCluster) error

MySQLClusterOption is the option type for for the invite factory

func CreateMySQLClusterInK8s

func CreateMySQLClusterInK8s(c client.Client) MySQLClusterOption

CreateMySQLClusterInK8s is the option for creating mysql cluster k8s resource

func CreateMySQLClusterSecret

func CreateMySQLClusterSecret(c client.Client, secret *corev1.Secret) MySQLClusterOption

CreateMySQLClusterSecret is the option for creating mysql cluster secret

func WithClusterAffinity

func WithClusterAffinity(affinity *corev1.Affinity) MySQLClusterOption

WithClusterAffinity sets affinity for mysql cluster

func WithClusterNotReadyCondition

func WithClusterNotReadyCondition() MySQLClusterOption

WithClusterNotReadyCondition sets the ready status to false

func WithClusterReadyCondition

func WithClusterReadyCondition() MySQLClusterOption

WithClusterReadyCondition sets the ready status to true

func WithMySQLClusterReadyPods

func WithMySQLClusterReadyPods(ctx context.Context, c client.StatusClient, readyNodes int) MySQLClusterOption

WithMySQLClusterReadyPods sets the reay nodes status

type MySQLUserOption

type MySQLUserOption func(*mysqluser.MySQLUser) error

MySQLUserOption is the option type for for the invite factory

func CreateMySQLUserInK8s

func CreateMySQLUserInK8s(cl client.Client) MySQLUserOption

CreateMySQLUserInK8s is a options func that creates in k8s the user

func WithPassword

func WithPassword(cl client.Client, password string) MySQLUserOption

WithPassword is an option to specify a password when creating the MysqlUser

func WithPermissions

func WithPermissions(permissions ...mysqlv1alpha1.MysqlPermission) MySQLUserOption

WithPermissions is an option to specify user permissions when creating the MysqlUser

func WithUser

func WithUser(user string) MySQLUserOption

WithUser is an option to specify a user when creating the MysqlUser

func WithUserReadyCondition

func WithUserReadyCondition() MySQLUserOption

WithUserReadyCondition sets the ready status

type MysqlDBOption

type MysqlDBOption func(*mysqldatabase.Database) error

MysqlDBOption to config the factory

func CreateDatabase

func CreateDatabase(ctx context.Context, c client.Client) MysqlDBOption

CreateDatabase is the option for creating project k8s resource

func WithDBReadyCondition

func WithDBReadyCondition() MysqlDBOption

WithDBReadyCondition sets the ready status

func WithMySQLCluster

func WithMySQLCluster(ctx context.Context, cl client.Client, name string) MysqlDBOption

WithMySQLCluster create secret and cluster and sets on the database

Jump to

Keyboard shortcuts

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