mysql

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2021 License: Apache-2.0 Imports: 7 Imported by: 1

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