mysql

package
v0.10.4 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2018 License: MPL-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMySQLBackend

func NewMySQLBackend(conf map[string]string, logger log.Logger) (physical.Backend, error)

NewMySQLBackend constructs a MySQL backend using the given API client and server address and credential for accessing mysql database.

Types

type MySQLBackend

type MySQLBackend struct {
	// contains filtered or unexported fields
}

MySQLBackend is a physical backend that stores data within MySQL database.

func (*MySQLBackend) Delete

func (m *MySQLBackend) Delete(ctx context.Context, key string) error

Delete is used to permanently delete an entry

func (*MySQLBackend) Get

func (m *MySQLBackend) Get(ctx context.Context, key string) (*physical.Entry, error)

Get is used to fetch and entry.

func (*MySQLBackend) List

func (m *MySQLBackend) List(ctx context.Context, prefix string) ([]string, error)

List is used to list all the keys under a given prefix, up to the next prefix.

func (*MySQLBackend) Put

func (m *MySQLBackend) Put(ctx context.Context, entry *physical.Entry) error

Put is used to insert or update an entry.

Jump to

Keyboard shortcuts

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