Versions in this module Expand all Collapse all v0 v0.1.0 Sep 13, 2021 Changes in this version + const TxContextKey + func Providers(opts ...ProvidersOptionFunc) di.Deps + type InProcessStore struct + func NewInProcessStore() *InProcessStore + func (i *InProcessStore) Ack(ctx context.Context, logID string, err error) error + func (i *InProcessStore) Log(ctx context.Context, log Log) error + func (i *InProcessStore) UnacknowledgedSteps(ctx context.Context, correlationID string) ([]Log, error) + func (i *InProcessStore) UncommittedSagas(ctx context.Context) ([]Log, error) + type Log struct + CorrelationID string + FinishedAt time.Time + ID string + LogType LogType + StartedAt time.Time + StepError error + StepName string + StepParam interface{} + type LogType uint + const Do + const Session + const Undo + type Option func(registry *Registry) + func WithLogger(logger log.Logger) Option + func WithTimeout(duration time.Duration) Option + type ProvidersOptionFunc func(options *providersOption) + func WithStore(store Store) ProvidersOptionFunc + func WithStoreConstructor(f func(args StoreArgs) (Store, error)) ProvidersOptionFunc + type Registry struct + Store Store + func NewRegistry(store Store, opts ...Option) *Registry + func (r *Registry) AddStep(step *Step) func(context.Context, interface{}) (interface{}, error) + func (r *Registry) Recover(ctx context.Context) + func (r *Registry) StartTX(ctx context.Context) (*TX, context.Context) + type SagaEndpoints map[string]endpoint.Endpoint + type Step struct + DecodeParam func([]byte) (interface{}, error) + Do func(context.Context, interface{}) (interface{}, error) + EncodeParam func(interface{}) ([]byte, error) + Name string + Undo func(ctx context.Context, req interface{}) error + type Store interface + Ack func(ctx context.Context, id string, err error) error + Log func(ctx context.Context, log Log) error + UnacknowledgedSteps func(ctx context.Context, correlationID string) ([]Log, error) + UncommittedSagas func(ctx context.Context) ([]Log, error) + type StoreArgs struct + Populator contract.DIPopulator + type TX struct + func TxFromContext(ctx context.Context) *TX + func (tx *TX) Commit(ctx context.Context) error + func (tx *TX) Rollback(ctx context.Context) error