Add an input (read-only) binding to the environment
(key string, val dagql.Typed, description string)
| 129 | |
| 130 | // Add an input (read-only) binding to the environment |
| 131 | func (env *Env) WithInput(key string, val dagql.Typed, description string) *Env { |
| 132 | env = env.Clone() |
| 133 | input := &Binding{Key: key, Value: val, Description: description} |
| 134 | _ = input.ID() // If val is an object, force its ingestion |
| 135 | env.inputsByName[key] = input |
| 136 | return env |
| 137 | } |
| 138 | |
| 139 | // Register the desire for a binding in the environment |
| 140 | func (env *Env) WithOutput(key string, expectedType dagql.Type, description string) *Env { |