Documentation
¶
Index ¶
- func CreateMongoSession(ctx context.Context, session mongo.Session) saga.Session
- func CreateMongoStore(client *mongo.Client, database string, collection string, ...) (saga.Store, error)
- func ExpireInSeconds(seconds int32) func(*MongoStore) error
- type Index
- type MongoSession
- type MongoStore
- func (store *MongoStore) CompleteSaga(session saga.Session, correlationId string, sagaType string) error
- func (store *MongoStore) CreateSaga(correlationId string, sagaType string) error
- func (store *MongoStore) DeleteSaga(correlationId string, sagaType string) error
- func (store *MongoStore) RequestSaga(correlationId string, sagaType string) (*saga.Context, error)
- func (store *MongoStore) SagaExists(correlationId string, sagaType string) (bool, error)
- func (store *MongoStore) UpdateState(session saga.Session, correlationId string, sagaType string, ...) error
- type Saga
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateMongoSession ¶
func CreateMongoStore ¶
func ExpireInSeconds ¶
func ExpireInSeconds(seconds int32) func(*MongoStore) error
Types ¶
type MongoSession ¶
func (*MongoSession) Close ¶
func (session *MongoSession) Close()
func (*MongoSession) Commit ¶
func (session *MongoSession) Commit() error
type MongoStore ¶
type MongoStore struct {
// contains filtered or unexported fields
}
func (*MongoStore) CompleteSaga ¶
func (*MongoStore) CreateSaga ¶
func (store *MongoStore) CreateSaga(correlationId string, sagaType string) error
Create a new saga with the given correlationId and sagaType in the MongoStore
func (*MongoStore) DeleteSaga ¶
func (store *MongoStore) DeleteSaga(correlationId string, sagaType string) error
func (*MongoStore) RequestSaga ¶
Request a saga from the MongoDB store and put a transaction lock on the saga. If an error occurs, the session will be closed and all transactions will be dismissed.
func (*MongoStore) SagaExists ¶
func (store *MongoStore) SagaExists(correlationId string, sagaType string) (bool, error)
func (*MongoStore) UpdateState ¶
Click to show internal directories.
Click to hide internal directories.