#include <instance_manager.h>
|
void | RegisterSigHandler () |
|
void | InitSigHandler (AgentSignal *signal) |
|
InstanceManagerAdapter * | FindApplicableAdapter (const ServiceInstance::Properties &props) |
|
void | StartServiceInstance (ServiceInstance *svc_instance, InstanceState *state, bool update) |
|
void | StopServiceInstance (ServiceInstance *svc_instance, InstanceState *state) |
|
void | StopStaleNetNS (ServiceInstance::Properties &props) |
|
void | OnError (InstanceTask *task, const std::string errors) |
|
void | OnExit (InstanceTask *task, const boost::system::error_code &ec) |
|
void | RegisterSvcInstance (InstanceTask *task, ServiceInstance *svc_instance) |
|
void | UnregisterSvcInstance (ServiceInstance *svc_instance) |
|
ServiceInstance * | UnregisterSvcInstance (InstanceTask *task) |
|
ServiceInstance * | GetSvcInstance (InstanceTask *task) const |
|
InstanceTaskQueue * | GetTaskQueue (const std::string &str) |
|
void | Enqueue (InstanceTask *task, const boost::uuids::uuid &uuid) |
|
void | ScheduleNextTask (InstanceTaskQueue *task_queue) |
|
bool | StartTask (InstanceTaskQueue *task_queue, InstanceTask *task) |
|
InstanceState * | GetState (InstanceTask *task) const |
|
void | SetState (ServiceInstance *svc_instance, InstanceState *state) |
|
void | ClearState (ServiceInstance *svc_instance) |
|
bool | DeleteState (ServiceInstance *svc_instance) |
|
void | UpdateStateStatusType (InstanceManagerChildEvent event) |
|
void | SetLastCmdType (ServiceInstance *svc_instance, int last_cmd_type) |
|
int | GetLastCmdType (ServiceInstance *svc_instance) const |
|
void | ClearLastCmdType (ServiceInstance *svc_instance) |
|
void | OnTaskTimeout (InstanceTaskQueue *task_queue) |
|
void | OnErrorEventHandler (InstanceManagerChildEvent event) |
|
void | OnExitEventHandler (InstanceManagerChildEvent event) |
|
void | OnTaskTimeoutEventHandler (InstanceManagerChildEvent event) |
|
void | StateClear () |
|
void | EventObserver (DBTablePartBase *db_part, DBEntryBase *entry) |
|
| DISALLOW_COPY_AND_ASSIGN (InstanceManager) |
|
Definition at line 33 of file instance_manager.h.
◆ TaskSvcMap
◆ ChldEventType
Enumerator |
---|
OnErrorEvent | |
OnTaskTimeoutEvent | |
OnExitEvent | |
Definition at line 40 of file instance_manager.h.
◆ CmdType
◆ InstanceManager()
InstanceManager::InstanceManager |
( |
Agent * |
agent | ) |
|
◆ ~InstanceManager()
InstanceManager::~InstanceManager |
( |
| ) |
|
◆ ClearLastCmdType()
◆ ClearState()
◆ DeleteState()
◆ DequeueEvent()
◆ DISALLOW_COPY_AND_ASSIGN()
◆ Enqueue()
◆ EventObserver()
◆ FindApplicableAdapter()
◆ GetLastCmdType()
int InstanceManager::GetLastCmdType |
( |
ServiceInstance * |
svc_instance | ) |
const |
|
private |
◆ GetState() [1/2]
◆ GetState() [2/2]
◆ GetSvcInstance()
◆ GetTaskQueue()
◆ Initialize()
void InstanceManager::Initialize |
( |
DB * |
database, |
|
|
const std::string & |
netns_cmd, |
|
|
const std::string & |
docker_cmd, |
|
|
const int |
netns_workers, |
|
|
const int |
netns_timeout |
|
) |
| |
◆ InitSigHandler()
void InstanceManager::InitSigHandler |
( |
AgentSignal * |
signal | ) |
|
|
private |
◆ OnError()
void InstanceManager::OnError |
( |
InstanceTask * |
task, |
|
|
const std::string |
errors |
|
) |
| |
|
private |
◆ OnErrorEventHandler()
◆ OnExit()
void InstanceManager::OnExit |
( |
InstanceTask * |
task, |
|
|
const boost::system::error_code & |
ec |
|
) |
| |
|
private |
◆ OnExitEventHandler()
◆ OnTaskTimeout()
◆ OnTaskTimeoutEventHandler()
◆ RegisterSigHandler()
void InstanceManager::RegisterSigHandler |
( |
| ) |
|
|
private |
◆ RegisterSvcInstance()
◆ ScheduleNextTask()
◆ SetLastCmdType()
void InstanceManager::SetLastCmdType |
( |
ServiceInstance * |
svc_instance, |
|
|
int |
last_cmd_type |
|
) |
| |
|
private |
◆ SetNamespaceStorePath()
void InstanceManager::SetNamespaceStorePath |
( |
std::string |
path | ) |
|
◆ SetNetNSCmd()
void InstanceManager::SetNetNSCmd |
( |
const std::string & |
netns_cmd | ) |
|
◆ SetStaleTimerInterval()
void InstanceManager::SetStaleTimerInterval |
( |
int |
minutes | ) |
|
◆ SetState()
◆ StaleTimeout()
bool InstanceManager::StaleTimeout |
( |
| ) |
|
◆ StaleTimerInterval()
int InstanceManager::StaleTimerInterval |
( |
| ) |
|
|
inline |
◆ StartServiceInstance()
◆ StartTask()
◆ StateClear()
void InstanceManager::StateClear |
( |
| ) |
|
|
private |
◆ StopServiceInstance()
◆ StopStaleNetNS()
◆ Terminate()
void InstanceManager::Terminate |
( |
| ) |
|
◆ UnregisterSvcInstance() [1/2]
◆ UnregisterSvcInstance() [2/2]
void InstanceManager::UnregisterSvcInstance |
( |
ServiceInstance * |
svc_instance | ) |
|
|
private |
◆ UpdateStateStatusType()
◆ InstanceManagerTest
friend class InstanceManagerTest |
|
friend |
◆ adapters_
◆ agent_
Agent* InstanceManager::agent_ |
|
private |
◆ kReattemptsDefault
const int InstanceManager::kReattemptsDefault = 2 |
|
static |
◆ kTimeoutDefault
const int InstanceManager::kTimeoutDefault = 30 |
|
static |
◆ kWorkersDefault
const int InstanceManager::kWorkersDefault = 1 |
|
static |
◆ last_cmd_types_
std::map<std::string, int> InstanceManager::last_cmd_types_ |
|
private |
◆ loadbalancer_config_path_
std::string InstanceManager::loadbalancer_config_path_ |
|
private |
◆ namespace_store_path_
std::string InstanceManager::namespace_store_path_ |
|
private |
◆ netns_cmd_
std::string InstanceManager::netns_cmd_ |
|
private |
◆ netns_reattempts_
int InstanceManager::netns_reattempts_ |
|
private |
◆ netns_timeout_
int InstanceManager::netns_timeout_ |
|
private |
◆ si_listener_
◆ stale_cleaner_
◆ stale_timer_
Timer* InstanceManager::stale_timer_ |
|
private |
◆ stale_timer_interval_
int InstanceManager::stale_timer_interval_ |
|
private |
◆ task_queues_
◆ task_svc_instances_
◆ work_queue_
The documentation for this class was generated from the following files: