Documentation
¶
Index ¶
- func DAGEdgesToDOT[T context.Context](connections ...DAGConnection[T]) (string, error)
- func DAGEdgesToMermaid[T context.Context](connections ...DAGConnection[T]) (string, error)
- func DAGToDOT[T context.Context](nodes ...*DAGNode[T]) (string, error)
- func DAGToMermaid[T context.Context](nodes ...*DAGNode[T]) (string, error)
- func Pipe2[T context.Context, A, B, C any](f1 func(ctx T, a A) (B, error), f2 func(ctx T, b B) (C, error)) func(ctx T, a A) (C, error)
- func Pipe3[T context.Context, A, B, C, D any](f1 func(ctx T, a A) (B, error), f2 func(ctx T, b B) (C, error), ...) func(ctx T, a A) (D, error)
- type DAGConnection
- type DAGEdgeBuilder
- type DAGNode
- type DAGPlan
- type Middleware
- type Step
- func Branch[T context.Context](condition func(ctx T) bool, ifBranch, elseBranch Step[T]) Step[T]
- func Chunk[T context.Context, V any](seq iter.Seq[V], size int, step func(ctx T, batch []V) error) Step[T]
- func Chunk2[T context.Context, K, V any](seq iter.Seq2[K, V], size int, step func(ctx T, keys []K, vals []V) error) Step[T]
- func DAG[T context.Context](nodes ...*DAGNode[T]) Step[T]
- func DAGEdges[T context.Context](connections ...DAGConnection[T]) Step[T]
- func DAGEdgesN[T context.Context](limit int, connections ...DAGConnection[T]) Step[T]
- func DAGN[T context.Context](limit int, nodes ...*DAGNode[T]) Step[T]
- func Each[T context.Context, V any](seq iter.Seq[V], step func(ctx T, item V) error) Step[T]
- func Each2[T context.Context, K, V any](seq iter.Seq2[K, V], step func(ctx T, key K, val V) error) Step[T]
- func Go[T context.Context](steps ...Step[T]) Step[T]
- func GoN[T context.Context](limit int, steps ...Step[T]) Step[T]
- func Once[T context.Context](step Step[T]) Step[T]
- func Pipe[T context.Context, In, Out any](fn func(ctx T, in In) (Out, error), get func(ctx T) In, ...) Step[T]
- func PipeSeq[T context.Context, In, Out any](seq iter.Seq[In], transform func(ctx T, item In) (Out, error), ...) Step[T]
- func PipeSeq2[T context.Context, K, V, Out any](seq iter.Seq2[K, V], transform func(ctx T, key K, val V) (Out, error), ...) Step[T]
- func Race[T context.Context](steps ...Step[T]) Step[T]
- func Seq[T context.Context](steps ...Step[T]) Step[T]
- func (s Step[T]) Branch(condition func(ctx T) bool, ifBranch, elseBranch Step[T]) Step[T]
- func (s Step[T]) Catch(handler func(ctx T, err error) error) Step[T]
- func (s Step[T]) Exec(ctx T) error
- func (s Step[T]) Fallback(fallback Step[T]) Step[T]
- func (s Step[T]) Go(steps ...Step[T]) Step[T]
- func (s Step[T]) GoN(limit int, steps ...Step[T]) Step[T]
- func (s Step[T]) Once() Step[T]
- func (s Step[T]) Race(steps ...Step[T]) Step[T]
- func (s Step[T]) Recover() Step[T]
- func (s Step[T]) Retry(attempts int, delay time.Duration) Step[T]
- func (s Step[T]) Then(steps ...Step[T]) Step[T]
- func (s Step[T]) Timeout(d time.Duration) Step[T]
- func (s Step[T]) Unless(predicate func(ctx T) bool) Step[T]
- func (s Step[T]) When(predicate func(ctx T) bool) Step[T]
- func (s Step[T]) Wrap(middlewares ...Middleware[T]) Step[T]
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DAGEdgesToDOT ¶ added in v0.4.0
func DAGEdgesToDOT[T context.Context](connections ...DAGConnection[T]) (string, error)
func DAGEdgesToMermaid ¶ added in v0.4.0
func DAGEdgesToMermaid[T context.Context](connections ...DAGConnection[T]) (string, error)
func DAGToMermaid ¶ added in v0.4.0
Types ¶
type DAGConnection ¶
type DAGEdgeBuilder ¶
func (DAGEdgeBuilder[T]) To ¶
func (b DAGEdgeBuilder[T]) To(to ...Step[T]) DAGConnection[T]
type DAGPlan ¶ added in v0.4.0
func NewDAGEdges ¶ added in v0.4.0
func NewDAGEdges[T context.Context](connections ...DAGConnection[T]) (*DAGPlan[T], error)
type Step ¶
func DAGEdgesN ¶
func DAGEdgesN[T context.Context](limit int, connections ...DAGConnection[T]) Step[T]
func (Step[T]) Wrap ¶
func (s Step[T]) Wrap(middlewares ...Middleware[T]) Step[T]
Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
gen-diagrams
command
|
|
|
examples
|
|
|
branch/with_flow
command
|
|
|
branch/without_flow
command
|
|
|
dag/with_flow
command
|
|
|
dag/without_flow
command
|
|
|
each/with_flow
command
|
|
|
each/without_flow
command
|
|
|
fallback/with_flow
command
|
|
|
fallback/without_flow
command
|
|
|
go/with_flow
command
|
|
|
go/without_flow
command
|
|
|
gon/with_flow
command
|
|
|
gon/without_flow
command
|
|
|
once/with_flow
command
|
|
|
once/without_flow
command
|
|
|
order_checkout/with_flow
command
|
|
|
order_checkout/without_flow
command
|
|
|
pipe/with_flow
command
|
|
|
pipe/without_flow
command
|
|
|
race/with_flow
command
|
|
|
race/without_flow
command
|
|
|
retry/with_flow
command
|
|
|
retry/without_flow
command
|
|
|
seq/with_flow
command
|
|
|
seq/without_flow
command
|
|
|
timeout/with_flow
command
|
|
|
timeout/without_flow
command
|
|
|
wrap/with_flow
command
|
|
|
wrap/without_flow
command
|
Click to show internal directories.
Click to hide internal directories.