Documentation
¶
Index ¶
- type BrMsgID
- type Gateway
- func (gw *Gateway) AddBridge(cfg *config.Bridge) error
- func (gw *Gateway) AddConfig(cfg *config.Gateway) error
- func (gw *Gateway) FindCanonicalMsgID(protocol string, mID string) string
- func (gw *Gateway) SendMessage(rmsg *config.Message, dest *bridge.Bridge, channel *config.ChannelInfo, ...) (string, error)
- type Router
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Gateway ¶
type Gateway struct {
config.Config
Router *Router
MyConfig *config.Gateway
Bridges map[string]*bridge.Bridge
Channels map[string]*config.ChannelInfo
ChannelOptions map[string]config.ChannelOptions
Message chan config.Message
Name string
Messages *lru.Cache
// contains filtered or unexported fields
}
func New ¶
New creates a new Gateway object associated with the specified router and following the given configuration.
func (*Gateway) AddBridge ¶
AddBridge sets up a new bridge in the gateway object with the specified configuration.
func (*Gateway) FindCanonicalMsgID ¶
FindCanonicalMsgID returns the ID under which a message was stored in the cache.
func (*Gateway) SendMessage ¶
func (gw *Gateway) SendMessage( rmsg *config.Message, dest *bridge.Bridge, channel *config.ChannelInfo, canonicalParentMsgID string, ) (string, error)
SendMessage sends a message (with specified parentID) to the channel on the selected destination bridge and returns a message ID or an error.
type Router ¶
type Router struct {
config.Config
sync.RWMutex
BridgeMap map[string]bridge.Factory
Gateways map[string]*Gateway
Message chan config.Message
MattermostPlugin chan config.Message
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.