micro/flow/flow.go
Vasiliy Tolstov 86626c5922 fieldalignment of all structs to save memory
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2021-04-27 08:32:47 +03:00

18 lines
336 B
Go

// Package flow is an interface used for saga pattern microservice workflow
package flow
type Step interface {
// Endpoint returns rpc endpoint service_name.service_method or broker topic
Endpoint() string
}
type Workflow interface {
Steps() [][]Step
Stop() error
}
type Flow interface {
Start(Workflow) error
Stop(Workflow)
}