Documentation
¶
Index ¶
- func GetSagatableName(svcName string) string
- func GrabbitTableNameTemplate(svcName, table string) string
- func SanitizeTableName(dirty string) string
- type Provider
- type SagaStore
- func (store *SagaStore) DeleteSaga(tx *sql.Tx, instance *saga.Instance) error
- func (store *SagaStore) GetSagaByID(tx *sql.Tx, sagaID string) (*saga.Instance, error)
- func (store *SagaStore) GetSagasByType(tx *sql.Tx, sagaType reflect.Type) (instances []*saga.Instance, err error)
- func (store *SagaStore) NewTx() *sql.Tx
- func (store *SagaStore) Purge() error
- func (store *SagaStore) RegisterSagaType(saga gbus.Saga)
- func (store *SagaStore) SaveNewSaga(tx *sql.Tx, sagaType reflect.Type, newInstance *saga.Instance) (err error)
- func (store *SagaStore) UpdateSaga(tx *sql.Tx, instance *saga.Instance) (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetSagatableName ¶ added in v1.1.0
GetSagatableName returns the table name in which to store the Sagas
func GrabbitTableNameTemplate ¶ added in v1.1.1
GrabbitTableNameTemplate returns the tamplated grabbit table name for the table type and service
func SanitizeTableName ¶ added in v1.1.1
SanitizeTableName returns a sanitizes and lower cased string for creating a table
Types ¶
type SagaStore ¶
type SagaStore struct { Tx gbus.TxProvider SvcName string ParamsMarkers []string }
SagaStore base type for embedding for new transactional saga stores
func (*SagaStore) DeleteSaga ¶
DeleteSaga implements interface method store.DeleteSaga
func (*SagaStore) GetSagaByID ¶
GetSagaByID implements interface method store.GetSagaByID
func (*SagaStore) GetSagasByType ¶
func (store *SagaStore) GetSagasByType(tx *sql.Tx, sagaType reflect.Type) (instances []*saga.Instance, err error)
GetSagasByType implements interface method store.GetSagasByType
func (*SagaStore) Purge ¶
Purge cleans up the saga store, to be used in tests and in extreme situations in production
func (*SagaStore) RegisterSagaType ¶
RegisterSagaType implements interface method store.RegisterSagaType