NewBatchNode creates a new batch processing node. Example: batchNode := batch.NewBatchNode(&batch.NodeConfig[Request, Response]{ Name: "MyBatchProcessor", InnerTask: myWorkflow, MaxConcurrency: 5, })
(config *NodeConfig[I, O])
| 49 | // MaxConcurrency: 5, |
| 50 | // }) |
| 51 | func NewBatchNode[I, O any](config *NodeConfig[I, O]) *Node[I, O] { |
| 52 | name := config.Name |
| 53 | if name == "" { |
| 54 | name = "Node" |
| 55 | } |
| 56 | return &Node[I, O]{ |
| 57 | name: name, |
| 58 | innerTask: config.InnerTask, |
| 59 | maxConcurrency: config.MaxConcurrency, |
| 60 | innerCompileOptions: config.InnerCompileOptions, |
| 61 | } |
| 62 | } |
| 63 | |
| 64 | // GetType returns the node name for callback identification. |
| 65 | // Implements components.Typer interface. |
no outgoing calls
no test coverage detected