Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var StateMachinePaths = make(map[string]models.StateMachineInfo)
StateMachinePaths represents the paths which root state machine need watch.
Functions ¶
func NewStateMachineFactory ¶
func NewStateMachineFactory( ctx context.Context, discoveryFactory discovery.Factory, stateMgr StateManager, ) discovery.StateMachineFactory
NewStateMachineFactory creates a StateMachineFactory instance.
Types ¶
type BrokerCluster ¶
type BrokerCluster interface { // Start starts the state machine for broker state change. Start() error // GetState returns the current state of broker cluster. GetState() *models.BrokerState // Close closes broker cluster controller Close() }
BrokerCluster represents broker cluster controller, 1) discovery active node list in broker cluster
type StateManager ¶
type StateManager interface { discovery.StateMachineEventHandle flow.NodeChoose // SetStateMachineFactory sets state machine factory. SetStateMachineFactory(stateMachineFct *stateMachineFactory) // GetStateMachineFactory returns state machine factory. GetStateMachineFactory() *stateMachineFactory // GetBrokerStates returns current broker state list. GetBrokerStates() []models.BrokerState // GetBrokerState returns current broker state by name. GetBrokerState(name string) (models.BrokerState, bool) // GetDatabase returns the logic database config by name. GetDatabase(name string) (models.LogicDatabase, bool) // GetDatabases returns all logic databases' config. GetDatabases() []models.LogicDatabase // GetLiveNodes returns all live broker nodes. GetLiveNodes() []models.StatelessNode }
StateManager represents root state manager, state coordinator.
func NewStateManager ¶
func NewStateManager( ctx context.Context, repoFactory statepkg.RepositoryFactory, connectionManager rpc.ConnectionManager, ) StateManager
NewStateManager creates a StateManager instance.
Click to show internal directories.
Click to hide internal directories.