func()

in internal/routing/routing.go [112:133]


func (b *Batches) Start(ctx context.Context) error {
	if len(b.routes) == 0 {
		return errors.New("routing.Batches: cannot start without registered routes")
	}
	ctx = context.WithoutCancel(ctx)
	b.started = true

	g := wait.Group{}
	g.Go(ctx, func(ctx context.Context) error {
		b.handleInput(ctx)
		return nil
	})

	go func() {
		g.Wait(ctx)
		for _, r := range b.routes {
			close(r.out)
		}
	}()

	return nil
}