mysql

package
v1.11.0-rc.10 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2023 License: Apache-2.0 Imports: 21 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 {
	state.BulkStore
	// contains filtered or unexported fields
}

MySQL state store.

func (*MySQL) BulkGet

func (m *MySQL) BulkGet(parentCtx context.Context, req []state.GetRequest, _ state.BulkGetOpts) ([]state.BulkGetResponse, error)

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(ctx context.Context, 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(ctx context.Context) 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