lang: core, funcs: Port some functions to CallableFunc API
Some modern features of our function engine and language might require this new API, so port what we can and figure out the rest later.
This commit is contained in:
@@ -113,3 +113,13 @@ func (obj *ChannelBasedSourceFunc) Stream(ctx context.Context) error {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// XXX: Is is correct to implement this here for this particular function?
|
||||
// XXX: tricky since this really receives input from a secret channel...
|
||||
// XXX: ADD A MUTEX AROUND READING obj.last ???
|
||||
//func (obj *ChannelBasedSourceFunc) Call(ctx context.Context, args []types.Value) (types.Value, error) {
|
||||
// if obj.last == nil {
|
||||
// return nil, fmt.Errorf("programming error")
|
||||
// }
|
||||
// return obj.last, nil
|
||||
//}
|
||||
|
||||
Reference in New Issue
Block a user