Categorygithub.com/italypaleale/dapr-sqlite-statestore
repositorypackage
0.1.1
Repository: https://github.com/italypaleale/dapr-sqlite-statestore.git
Documentation: pkg.go.dev

# Packages

No description provided by the author

# README

SQLite3 state store for Dapr

This project contains a pluggable component for using SQLite3 as a state store with Dapr.

Example usage

See the example folder for an example app and how to run the component.

Docker image

Published on GitHub Container Registry:

ghcr.io/italypaleale/dapr-sqlite-statestore:latest

Supported features

  • ✅ CRUD
  • ✅ Transactional
  • ✅ ETag
  • ✅ TTL
  • ✅ Actors
  • ❌ Query

Setup Dapr component

To setup a SQLite state store, create a component of type state.sqlite. See this guide on how to create and apply a state store configuration.

apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
  name: <NAME>
spec:
  type: state.sqlite
  version: v1
  metadata:
    - name: connectionString
      value: mysqlite.db

Spec metadata fields

FieldDetailsExample
connectionStringThe connection string to connect to the database. Usually, that's just the path to a file on disk. If needed, you pass a DSN with the options listed in the docs for go-sqlite3path-to-db.db
DSN: file:mydb.db?immutable=1
tableNameName of the table where to store datastate
cleanupIntervalInSecondsInterval, in seconds, to purge expired records. Set to <=0 to disable.1200 (20 minutes)