Files
lambda/internal/registry/process.go
2026-02-09 18:26:03 -05:00

32 lines
525 B
Go

package registry
import (
"git.maximhutz.com/max/lambda/pkg/engine"
)
type Process interface {
engine.Process[Expr]
InType() string
}
type registeredProcess[T any] struct {
process engine.Process[T]
inType string
}
func (e registeredProcess[T]) InType() string { return e.inType }
func (b registeredProcess[T]) Get() (Expr, error) {
s, err := b.process.Get()
if err != nil {
return nil, err
}
return NewExpr(b.inType, s), nil
}
func (b registeredProcess[T]) Step(i int) bool {
return b.process.Step(i)
}