Documentation
¶
Index ¶
- func Dial(addr, tlsCert, tlsKey, tlsCACert string, insecureSkipVerify bool) (api.ExtClient, error)
- type Client
- func (c *Client) Listen() error
- func (c *Client) Register(network string, channel string, event string, handler dispatch.Handler) (uint64, error)
- func (c *Client) RegisterCmd(network string, channel string, command *cmd.Command) (uint64, error)
- func (c *Client) Unregister(id uint64) (bool, error)
- func (c *Client) UnregisterCmd(id uint64) (bool, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Dial ¶
Dial creates a mutually authenticated grpc connection that's given directly to NewClient.
If tlsCert and tlsKey are present they will be used as the client's certificates and tls is turned on. If tlsCACert is present it will use that certificate instead of the system wide CA certificates. And finally if insecureSkipVerify is on it will not verify the server's certificate.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client helps handle event and command dispatching remotely.
func (*Client) Listen ¶
Listen for events and commands and dispatch them to handlers. It blocks forever on its two listening goroutines.
func (*Client) Register ¶
func (c *Client) Register(network string, channel string, event string, handler dispatch.Handler) (uint64, error)
Register an event handler with the bot
func (*Client) RegisterCmd ¶
RegisterCmd with the bot
func (*Client) Unregister ¶
Unregister an event handler
Click to show internal directories.
Click to hide internal directories.