Documentation ¶
Index ¶
- Variables
- func CapturePanic(ctx context.Context)
- func GetStepID(ctx context.Context) (uuid.UUID, error)
- func Merge[T any](ctx context.Context, req *T, responses ...*T) (*T, error)
- func Name[T any](s Step[T]) string
- func Parallel[T any](mid Mid[T], merge MergeRequest[T], steps ...Step[T]) *parallel[T]
- func Series[T any](mid Mid[T], steps ...Step[T]) *series[T]
- func SetIDGenerator(g IDGenerator)
- type IDGenerator
- type MergeRequest
- type Mid
- type MidFunc
- type Middleware
- type Pipeline
- type Selector
- type StaticID
- type Step
- type StepFunc
- type UUIDv7
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrMissingFromContext = errors.New("missing from context")
Functions ¶
func CapturePanic ¶
func Parallel ¶
func Parallel[T any](mid Mid[T], merge MergeRequest[T], steps ...Step[T]) *parallel[T]
Parallel executes a list of steps in parallel. Once all the steps are done, the merge request MergeRequest will combine all the results into one struct T.
func SetIDGenerator ¶
func SetIDGenerator(g IDGenerator)
SetIDGenerator allows to set a StaticID generator for testing purposes.
Types ¶
type IDGenerator ¶
func GetIDGenerator ¶
func GetIDGenerator() IDGenerator
type MergeRequest ¶
func MergeTransform ¶
func MergeTransform[T any](t ...func(*mergo.Config)) MergeRequest[T]
type Mid ¶
type Mid[T any] []Middleware[T]
type Middleware ¶
type Pipeline ¶
func NewPipeline ¶
func NewPipeline[T any](mid ...Middleware[T]) *Pipeline[T]
Click to show internal directories.
Click to hide internal directories.