New makes a new Controller from the given Config.
(c *Config)
| 87 | |
| 88 | // New makes a new Controller from the given Config. |
| 89 | func New(c *Config) Controller { |
| 90 | ctlr := &controller{ |
| 91 | config: *c, |
| 92 | clock: &clock.RealClock{}, |
| 93 | } |
| 94 | return ctlr |
| 95 | } |
| 96 | |
| 97 | // Run begins processing items, and will continue until a value is sent down stopCh. |
| 98 | // It's an error to call Run more than once. |
no outgoing calls