component

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2022 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewSQLiteStateStore

func NewSQLiteStateStore(logger logger.Logger) state.Store

NewSQLiteStateStore creates a new instance of the SQLite state store.

Types

type DBAccess

type DBAccess interface {
	Init(metadata state.Metadata) error
	Ping(ctx context.Context) error
	Set(ctx context.Context, req *state.SetRequest) error
	Get(ctx context.Context, req *state.GetRequest) (*state.GetResponse, error)
	Delete(ctx context.Context, req *state.DeleteRequest) error
	ExecuteMulti(ctx context.Context, reqs []state.TransactionalStateOperation) error
	Close() error
}

DBAccess is a private interface which enables unit testing of SQLite.

type SQLiteStore

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

SQLite Database state store.

func (*SQLiteStore) BulkDelete

func (s *SQLiteStore) BulkDelete(req []state.DeleteRequest) error

BulkDelete removes multiple entries from the store.

func (*SQLiteStore) BulkGet

func (s *SQLiteStore) BulkGet(req []state.GetRequest) (bool, []state.BulkGetResponse, error)

BulkGet performs a bulks get operations.

func (*SQLiteStore) BulkSet

func (s *SQLiteStore) BulkSet(req []state.SetRequest) error

BulkSet adds/updates multiple entities on store.

func (*SQLiteStore) Close

func (s *SQLiteStore) Close() error

Close implements io.Closer.

func (*SQLiteStore) Delete

func (s *SQLiteStore) Delete(req *state.DeleteRequest) error

Delete removes an entity from the store.

func (*SQLiteStore) Features

func (s *SQLiteStore) Features() []state.Feature

Features returns the features available in this state store.

func (*SQLiteStore) Get

Get returns an entity from store.

func (*SQLiteStore) Init

func (s *SQLiteStore) Init(metadata state.Metadata) error

Init initializes the Sql server state store.

func (*SQLiteStore) Multi

func (s *SQLiteStore) Multi(request *state.TransactionalStateRequest) error

Multi handles multiple transactions. Implements TransactionalStore.

func (*SQLiteStore) Ping

func (s *SQLiteStore) Ping() error

func (*SQLiteStore) Set

func (s *SQLiteStore) Set(req *state.SetRequest) error

Set adds/updates an entity on store.

Jump to

Keyboard shortcuts

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