Invoke registers functions that are executed eagerly on application start. Arguments for these invocations are built using the constructors registered by Provide. Passing multiple Invoke options appends the new invocations to the application's existing list. Unlike constructors, invocations are alw
(funcs ...interface{})
| 62 | // advanced features, including optional parameters and named instances, see |
| 63 | // the documentation of the In and Out types. |
| 64 | func Invoke(funcs ...interface{}) Option { |
| 65 | return invokeOption{ |
| 66 | Targets: funcs, |
| 67 | Stack: fxreflect.CallerStack(1, 0), |
| 68 | } |
| 69 | } |
| 70 | |
| 71 | type invokeOption struct { |
| 72 | Targets []interface{} |