Documentation
¶
Overview ¶
Package processor implements the processor logic based on ETCD worker(pkg/orchestrator).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitMetrics ¶
func InitMetrics(registry *prometheus.Registry)
InitMetrics registers all metrics used in processor
Types ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager is a manager of processor, which maintains the state and behavior of processors
func (*Manager) AsyncClose ¶
func (m *Manager) AsyncClose()
AsyncClose sends a close signal to Manager and closing all processors
func (*Manager) SyncClose ¶
func (m *Manager) SyncClose()
SyncClose closes all processors Note: This method must not be called with `Tick`!!!
func (*Manager) Tick ¶
func (m *Manager) Tick(stdCtx context.Context, state orchestrator.ReactorState) (nextState orchestrator.ReactorState, err error)
Tick implements the `orchestrator.State` interface the `state` parameter is sent by the etcd worker, the `state` must be a snapshot of KVs in etcd the Tick function of Manager create or remove processor instances according to the specified `state`, or pass the `state` to processor instances
func (*Manager) WriteDebugInfo ¶
WriteDebugInfo write the debug info to Writer