mysql

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package mysql provides mysql storage related utilities.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMysqlStorageProvider

func NewMysqlStorageProvider(host string, port int32, username, password, database string) builderrest.StoreFn

NewMysqlStorageProvider replaces underlying persistent layer (which by default is etcd) w/ MySQL. An example of storaing example resource to Mysql will be:

builder.APIServer.
  WithResourceAndStorage(&v1alpha1.ExampleResource{}, mysql.NewMysqlStorageProvider(
        "", // mysql host name		e.g. "127.0.0.1"
        0,  // mysql password 		e.g. 3306
        "", // mysql username 		e.g. "mysql"
        "", // mysql password 		e.g. "password"
        "", // mysql database name 	e.g. "mydb"
        )).Build()

Types

This section is empty.

Jump to

Keyboard shortcuts

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