driver

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Database

type Database interface {
	Init(appconfig.Config) error
	Connect() error
	Prepare() (*v1alpha1.PreservedConfig, error)
	Quiesce() (*v1alpha1.QuiesceResult, error)
	Unquiesce(*v1alpha1.PreservedConfig) error
}

type DriverManager

type DriverManager struct {
	client.Client
	// contains filtered or unexported fields
}

func NewManager

func NewManager(k8sclient client.Client, instance *v1alpha1.AppHook, secret *corev1.Secret) (*DriverManager, error)

func (*DriverManager) DBConnect

func (d *DriverManager) DBConnect() error

func (*DriverManager) DBPrepare added in v0.1.0

func (d *DriverManager) DBPrepare() (*v1alpha1.PreservedConfig, error)

func (*DriverManager) DBQuiesce

func (d *DriverManager) DBQuiesce() (*v1alpha1.QuiesceResult, error)

func (*DriverManager) DBUnquiesce

func (d *DriverManager) DBUnquiesce(prev *v1alpha1.PreservedConfig) error

func (*DriverManager) NotReady

func (d *DriverManager) NotReady()

func (*DriverManager) Ready

func (d *DriverManager) Ready()

func (*DriverManager) Update added in v0.0.5

func (d *DriverManager) Update(instance *v1alpha1.AppHook, secret *corev1.Secret) error

danger, do NOT update the config when database is quiesced

type SupportedDB

type SupportedDB string
const (
	MySQL    SupportedDB = "MySQL"
	Postgres SupportedDB = "Postgres"
	MongoDB  SupportedDB = "MongoDB"
	Redis    SupportedDB = "Redis"
)

Jump to

Keyboard shortcuts

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