mysql

package
v1.10.9 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2023 License: Apache-2.0 Imports: 18 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMySQLStateStore

func NewMySQLStateStore(logger logger.Logger) state.Store

NewMySQLStateStore creates a new instance of MySQL state store.

Types

type MySQL

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

MySQL state store.

func (*MySQL) BulkDelete

func (m *MySQL) BulkDelete(ctx context.Context, req []state.DeleteRequest) error

BulkDelete removes multiple entries from the store Store Interface.

func (*MySQL) BulkGet

func (m *MySQL) BulkGet(ctx context.Context, req []state.GetRequest) (bool, []state.BulkGetResponse, error)

BulkGet performs a bulks get operations.

func (*MySQL) BulkSet

func (m *MySQL) BulkSet(ctx context.Context, req []state.SetRequest) error

BulkSet adds/updates multiple entities on store Store Interface.

func (*MySQL) Close

func (m *MySQL) Close() error

Close implements io.Closer.

func (*MySQL) Delete

func (m *MySQL) Delete(ctx context.Context, req *state.DeleteRequest) error

Delete removes an entity from the store Store Interface.

func (*MySQL) Features added in v1.1.1

func (m *MySQL) Features() []state.Feature

Features returns the features available in this state store.

func (*MySQL) Get

func (m *MySQL) Get(parentCtx context.Context, req *state.GetRequest) (*state.GetResponse, error)

Get returns an entity from store Store Interface.

func (*MySQL) GetComponentMetadata added in v1.10.1

func (m *MySQL) GetComponentMetadata() map[string]string

func (*MySQL) Init

func (m *MySQL) Init(metadata state.Metadata) error

Init initializes the SQL server state store Implements the following interfaces: Store TransactionalStore Populate the rest of the MySQL object by reading the metadata and opening a connection to the server.

func (*MySQL) Multi

func (m *MySQL) Multi(ctx context.Context, request *state.TransactionalStateRequest) error

Multi handles multiple transactions. TransactionalStore Interface.

func (*MySQL) Ping added in v1.4.4

func (m *MySQL) Ping() error

Ping the database.

func (*MySQL) PingWithContext added in v1.10.1

func (m *MySQL) PingWithContext(parentCtx context.Context) error

PingWithContext is like Ping but accepts a context.

func (*MySQL) Set

func (m *MySQL) Set(ctx context.Context, req *state.SetRequest) error

Set adds/updates an entity on store Store Interface.

Jump to

Keyboard shortcuts

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