network

package
v0.0.0-...-f77af5b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 28, 2018 License: BSD-3-Clause Imports: 7 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NetworkManager

type NetworkManager struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

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)

func (*NetworkManager) Shutdown

func (nm *NetworkManager) Shutdown()

Stop all bots

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL