(config StatusManagerConfig)
| 37 | } |
| 38 | |
| 39 | func NewStatusManager(config StatusManagerConfig) *StatusManager { |
| 40 | ctx, cancel := context.WithCancel(context.Background()) |
| 41 | |
| 42 | sm := &StatusManager{ |
| 43 | componentNames: make([]string, 0), |
| 44 | components: make(map[string]Component), |
| 45 | ctx: ctx, |
| 46 | cancel: cancel, |
| 47 | config: config, |
| 48 | closedCh: make(chan struct{}), |
| 49 | } |
| 50 | |
| 51 | return sm |
| 52 | } |
| 53 | |
| 54 | func (sm *StatusManager) Context() context.Context { |
| 55 | return sm.ctx |
no outgoing calls