This example adds a Runnable for the Manager to Start.
()
| 76 | |
| 77 | // This example adds a Runnable for the Manager to Start. |
| 78 | func ExampleManager_add() { |
| 79 | err := mgr.Add(manager.RunnableFunc(func(context.Context) error { |
| 80 | // Do something |
| 81 | return nil |
| 82 | })) |
| 83 | if err != nil { |
| 84 | log.Error(err, "unable add a runnable to the manager") |
| 85 | os.Exit(1) |
| 86 | } |
| 87 | } |
| 88 | |
| 89 | // This example starts a Manager that has had Runnables added. |
| 90 | func ExampleManager_start() { |
nothing calls this directly
no test coverage detected
searching dependent graphs…