Documentation
¶
Index ¶
- type ActorReminder
- type ActorTypeReminders
- type Option
- type SQLite
- func (s *SQLite) ActorReminders(t *testing.T, ctx context.Context, actorType string) ActorTypeReminders
- func (s *SQLite) Cleanup(t *testing.T)
- func (s *SQLite) CountStateKeys(t *testing.T, ctx context.Context, keyPrefix string) int
- func (s *SQLite) DeleteStateKeys(t *testing.T, ctx context.Context, likePattern string)
- func (s *SQLite) FirstStateValue(t *testing.T, ctx context.Context, instanceID, keyPrefix string) (string, []byte)
- func (s *SQLite) GetComponent(t *testing.T) string
- func (s *SQLite) GetConnection(t *testing.T) *sql.DB
- func (s *SQLite) GetTableName(t *testing.T) string
- func (s *SQLite) ReadStateValue(t *testing.T, ctx context.Context, instanceID, keySuffix string) (string, []byte)
- func (s *SQLite) ReadStateValues(t *testing.T, ctx context.Context, instanceID, keyPrefix string) [][]byte
- func (s *SQLite) Run(t *testing.T, ctx context.Context)
- func (s *SQLite) TableName() string
- func (s *SQLite) WriteStateValue(t *testing.T, ctx context.Context, key string, raw []byte)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActorReminder ¶ added in v1.15.0
type ActorTypeReminders ¶ added in v1.15.0
type Option ¶
type Option func(*options)
Option is a function that configures the process.
func WithActorStateStore ¶
WithActorStateStore configures whether the state store is enabled as actor state store.
func WithCreateStateTables ¶
func WithCreateStateTables() Option
WithCreateStateTables configures whether the state store should create the state tables.
func WithDBPath ¶ added in v1.15.0
func WithMetadata ¶
WithMetadata adds a metadata option to the component. This can be invoked multiple times.
func WithTableName ¶ added in v1.14.5
type SQLite ¶
type SQLite struct {
// contains filtered or unexported fields
}
SQLite database that can be used in integration tests. Consumers should always run this Process before any other Framework Processes which consume it so all migrations are applied.
func (*SQLite) ActorReminders ¶ added in v1.15.0
func (*SQLite) CountStateKeys ¶ added in v1.17.7
CountStateKeys returns the number of state keys matching the given prefix.
func (*SQLite) DeleteStateKeys ¶
DeleteStateKeys deletes all rows whose key matches the given SQL LIKE pattern. Use `%` as the wildcard (e.g. `%||signature-%`).
func (*SQLite) FirstStateValue ¶
func (s *SQLite) FirstStateValue(t *testing.T, ctx context.Context, instanceID, keyPrefix string) (string, []byte)
FirstStateValue returns the (key, base64-decoded value) of the first row matching the given instance ID and key prefix (e.g. "history"). Fails the test if no such row exists.
func (*SQLite) GetComponent ¶
GetComponent returns the Component resource.
func (*SQLite) GetConnection ¶
GetConnection returns the connection to the SQLite database.
func (*SQLite) GetTableName ¶ added in v1.14.5
GetTableName returns the connection to the SQLite database.
func (*SQLite) ReadStateValue ¶ added in v1.17.7
func (s *SQLite) ReadStateValue(t *testing.T, ctx context.Context, instanceID, keySuffix string) (string, []byte)
ReadStateValue loads and base64-decodes the single value for the given workflow instance and exact key suffix (e.g. "metadata"). Fails the test if no such row exists.
func (*SQLite) ReadStateValues ¶ added in v1.17.7
func (s *SQLite) ReadStateValues(t *testing.T, ctx context.Context, instanceID, keyPrefix string) [][]byte
ReadStateValues reads base64-encoded state values from the SQLite database matching the given instance ID and key prefix.
func (*SQLite) WriteStateValue ¶ added in v1.17.7
WriteStateValue base64-encodes and writes the given raw bytes to the state store under the exact key provided. Uses INSERT OR REPLACE so it works for both new rows and overwrites.