Documentation ¶
Index ¶
- func MySQLUser(cluster *mysqlv1alpha1.MysqlCluster, opts ...MySQLUserOption) *mysqluser.MySQLUser
- func NewDatabase(opts ...MysqlDBOption) *mysqldatabase.Database
- func NewMySQLCluster(opts ...MySQLClusterOption) *mysqlv1alpha1.MysqlCluster
- type MySQLClusterOption
- func CreateMySQLClusterInK8s(c client.Client) MySQLClusterOption
- func CreateMySQLClusterSecret(c client.Client, secret *corev1.Secret) MySQLClusterOption
- func WithClusterAffinity(affinity *corev1.Affinity) MySQLClusterOption
- func WithClusterNotReadyCondition() MySQLClusterOption
- func WithClusterReadyCondition() MySQLClusterOption
- func WithMySQLClusterReadyPods(ctx context.Context, c client.StatusClient, readyNodes int) MySQLClusterOption
- type MySQLUserOption
- func CreateMySQLUserInK8s(cl client.Client) MySQLUserOption
- func WithPassword(cl client.Client, password string) MySQLUserOption
- func WithPermissions(permissions ...mysqlv1alpha1.MysqlPermission) MySQLUserOption
- func WithUser(user string) MySQLUserOption
- func WithUserReadyCondition() MySQLUserOption
- type MysqlDBOption
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 ¶
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 ¶
WithMySQLCluster create secret and cluster and sets on the database