MCPcopy Index your code
hub / github.com/kubernetes-sigs/controller-runtime / ExampleManager_add

Function ExampleManager_add

pkg/manager/example_test.go:78–87  ·  view source on GitHub ↗

This example adds a Runnable for the Manager to Start.

()

Source from the content-addressed store, hash-verified

76
77// This example adds a Runnable for the Manager to Start.
78func 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.
90func ExampleManager_start() {

Callers

nothing calls this directly

Calls 3

RunnableFuncFuncType · 0.92
AddMethod · 0.65
ErrorMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…