Documentation ¶
Overview ¶
Package mysqlstore provides a mysql store implementation for sagas.
Index ¶
- func Migrations(conn string) []*otgorm.Migration
- func Providers() di.Deps
- type MySQLStore
- func (s *MySQLStore) Ack(ctx context.Context, id string, err error) error
- func (s *MySQLStore) CleanUp(ctx context.Context) error
- func (s *MySQLStore) Log(ctx context.Context, log sagas.Log) error
- func (s *MySQLStore) UnacknowledgedSteps(ctx context.Context, correlationID string) ([]sagas.Log, error)
- func (s *MySQLStore) UncommittedSagas(ctx context.Context) ([]sagas.Log, error)
- type Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Migrations ¶
Migrations returns the database migrations needed for MySQLStore.
Types ¶
type MySQLStore ¶
type MySQLStore struct {
// contains filtered or unexported fields
}
MySQLStore is a Store implementation for sagas.
func (*MySQLStore) CleanUp ¶
func (s *MySQLStore) CleanUp(ctx context.Context) error
CleanUp periodically removes the logs that exceed their of maximum retention.
func (*MySQLStore) UnacknowledgedSteps ¶
func (s *MySQLStore) UnacknowledgedSteps(ctx context.Context, correlationID string) ([]sagas.Log, error)
UnacknowledgedSteps returns all unacknowledged steps from the store. Those steps are up for rollback.
func (*MySQLStore) UncommittedSagas ¶
UncommittedSagas searches all uncommitted sagas and returns unacknowledged steps from those sagas.
type Option ¶
type Option func(store *MySQLStore)
Option is the type for MySQLStore options.
func WithCleanUpInterval ¶
WithCleanUpInterval is the option that sets the clean up interval.
func WithRetention ¶
WithRetention is the option that sets the maximum log retention after which the log will be cleared.