Documentation ¶
Index ¶
- type NetworkManager
- func (nm *NetworkManager) Connect(config *common.BotConfig) common.ChatBot
- func (nm *NetworkManager) GetUserByChatbotId(id int) string
- func (nm *NetworkManager) IsRunning() bool
- func (nm *NetworkManager) MonitorChatbots()
- func (nm *NetworkManager) RefreshChatbots()
- func (nm *NetworkManager) Send(chatbotId int, channel, msg string)
- func (nm *NetworkManager) Shutdown()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NetworkManager ¶
func NewNetworkManager ¶
func NewNetworkManager(storage common.Storage, fromServer chan *line.Line) *NetworkManager
func (*NetworkManager) Connect ¶
func (nm *NetworkManager) Connect(config *common.BotConfig) common.ChatBot
func (*NetworkManager) GetUserByChatbotId ¶
func (nm *NetworkManager) GetUserByChatbotId(id int) string
Get the User for a ChatbotId
func (*NetworkManager) IsRunning ¶
func (nm *NetworkManager) IsRunning() bool
func (*NetworkManager) MonitorChatbots ¶
func (nm *NetworkManager) MonitorChatbots()
Check out chatbots are alive, recreating them if not. Run this in go-routine.
func (*NetworkManager) RefreshChatbots ¶
func (nm *NetworkManager) RefreshChatbots()
Connect to networks / start chatbots. Loads chatbot configuration from DB.
func (*NetworkManager) Send ¶
func (nm *NetworkManager) Send(chatbotId int, channel, msg string)
Click to show internal directories.
Click to hide internal directories.