mysql

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(opts *Provider)

Option configures the couchdb provider.

func WithDBPrefix

func WithDBPrefix(dbPrefix string) Option

WithDBPrefix option is for adding prefix to db name.

type Provider

type Provider struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

Provider represents a MySQL DB implementation of the storage.Provider interface.

func NewProvider

func NewProvider(dbPath string, opts ...Option) (*Provider, error)

NewProvider instantiates Provider.

func (*Provider) Close

func (p *Provider) Close() error

Close closes the provider.

func (*Provider) CloseStore

func (p *Provider) CloseStore(name string) error

CloseStore closes a previously opened store.

func (*Provider) OpenStore

func (p *Provider) OpenStore(name string) (storage.Store, error)

OpenStore opens and returns new db for given name space.

Jump to

Keyboard shortcuts

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