Documentation ¶
Index ¶
- func NewSQLiteStateStore(logger logger.Logger) state.Store
- type DBAccess
- type SQLiteStore
- func (s *SQLiteStore) BulkDelete(ctx context.Context, req []state.DeleteRequest) error
- func (s *SQLiteStore) BulkGet(ctx context.Context, req []state.GetRequest) (bool, []state.BulkGetResponse, error)
- func (s *SQLiteStore) BulkSet(ctx context.Context, req []state.SetRequest) error
- func (s *SQLiteStore) Close() error
- func (s *SQLiteStore) Delete(ctx context.Context, req *state.DeleteRequest) error
- func (s *SQLiteStore) Features() []state.Feature
- func (s *SQLiteStore) Get(ctx context.Context, req *state.GetRequest) (*state.GetResponse, error)
- func (s SQLiteStore) GetComponentMetadata() map[string]string
- func (s *SQLiteStore) Init(metadata state.Metadata) error
- func (s *SQLiteStore) Multi(ctx context.Context, request *state.TransactionalStateRequest) error
- func (s *SQLiteStore) Ping() error
- func (s *SQLiteStore) Set(ctx context.Context, req *state.SetRequest) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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(ctx context.Context, req []state.DeleteRequest) error
BulkDelete removes multiple entries from the store.
func (*SQLiteStore) BulkGet ¶
func (s *SQLiteStore) BulkGet(ctx context.Context, req []state.GetRequest) (bool, []state.BulkGetResponse, error)
BulkGet performs a bulks get operations.
func (*SQLiteStore) BulkSet ¶
func (s *SQLiteStore) BulkSet(ctx context.Context, req []state.SetRequest) error
BulkSet adds/updates multiple entities on store.
func (*SQLiteStore) Delete ¶
func (s *SQLiteStore) Delete(ctx context.Context, 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 ¶
func (s *SQLiteStore) Get(ctx context.Context, req *state.GetRequest) (*state.GetResponse, error)
Get returns an entity from store.
func (SQLiteStore) GetComponentMetadata ¶
func (s SQLiteStore) GetComponentMetadata() map[string]string
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(ctx context.Context, 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(ctx context.Context, req *state.SetRequest) error
Set adds/updates an entity on store.
Click to show internal directories.
Click to hide internal directories.