Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeleteSubAllPlugins ¶
func DeleteSubAllPlugins(client *Client)
when a client disconnects and is cleansession true we want to remove all subscriptions that client held in all plugins.
func ReadPluginConfig ¶
func StartPlugins ¶
func StartPlugins()
Types ¶
type Plugin ¶
type Plugin interface { Initialise() error AddSub(*Client, []string, byte, chan byte) DeleteSub(*Client, []string, chan bool) }
define the interface for a Plugin, any struct with these methods can be a plugin
type RedirectPlugin ¶
type RedirectPlugin struct { sync.RWMutex Redirects map[string]string // contains filtered or unexported fields }
func (*RedirectPlugin) AddSub ¶
func (rp *RedirectPlugin) AddSub(client *Client, topic []string, qos byte, complete chan byte)
func (*RedirectPlugin) DeleteSub ¶
func (rp *RedirectPlugin) DeleteSub(client *Client, topic []string, complete chan bool)
func (*RedirectPlugin) Initialise ¶
func (rp *RedirectPlugin) Initialise() error
func (*RedirectPlugin) Run ¶
func (rp *RedirectPlugin) Run()
type TwitterPlugin ¶
type TwitterPlugin struct { sync.RWMutex Subscribed map[*Client]byte // contains filtered or unexported fields }
func (*TwitterPlugin) AddSub ¶
func (tp *TwitterPlugin) AddSub(client *Client, subscription []string, qos byte, complete chan byte)
func (*TwitterPlugin) DeleteSub ¶
func (tp *TwitterPlugin) DeleteSub(client *Client, topic []string, complete chan bool)
func (*TwitterPlugin) Initialise ¶
func (tp *TwitterPlugin) Initialise() error
func (*TwitterPlugin) Run ¶
func (tp *TwitterPlugin) Run()
Click to show internal directories.
Click to hide internal directories.