Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Mandatabale ¶
func Mandatabale[T, ST any](e *Event[ST], f func(t T)) func(T) Executable
func Worker ¶
func Worker(c chan Executable)
Types ¶
type Event ¶
type Event[RT any] struct { Func SagaExecuteFunc[RT] // contains filtered or unexported fields }
func (*Event[RT]) Distribute ¶
func (e *Event[RT]) Distribute(r RT) (n []Executable)
func (*Event[RT]) Execute ¶
func (e *Event[RT]) Execute() (n []Executable, err error)
func (*Event[RT]) Mandates ¶
func (e *Event[RT]) Mandates(r Requireing[RT])
type Executable ¶
type Executable interface {
Execute() ([]Executable, error)
}
type Requireing ¶
type Requireing[T any] func(T) Executable
func End ¶
func End[T any](s *Saga) Requireing[T]
type Saga ¶
type Saga struct {
// contains filtered or unexported fields
}
func (*Saga) End ¶
func (s *Saga) End(any) Executable
func (*Saga) Event ¶
func (s *Saga) Event(e Executable)
func (*Saga) Execute ¶
func (s *Saga) Execute(c chan<- Executable)
type SagaExecuteFunc ¶
Click to show internal directories.
Click to hide internal directories.