You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While trying to implement influxdata/influxdb/tasks/lastSuccess, I discovered that there's not a way to get an option defined in flux from inside a builtin. @wolffcm and I talked about it, and decided that it might be best to be able to get to the flux options from the context.Context from a function.
The text was updated successfully, but these errors were encountered:
I'd need to know the specifics, but the best way to use an option inside of a builtin is likely to use some indirection. A few things to consider when using another value inside of a builtin. A builtin doesn't really understand the concept of closures which means that it doesn't really understand the concept of scope. But it does understand the concept of passing values. I've used this technique before:
The builtin includes a parameter for the option and the user facing function will include it automatically. This causes the interpreter to take care of everything.
While trying to implement
influxdata/influxdb/tasks/lastSuccess
, I discovered that there's not a way to get anoption
defined in flux from inside a builtin. @wolffcm and I talked about it, and decided that it might be best to be able to get to the flux options from thecontext.Context
from a function.The text was updated successfully, but these errors were encountered: