Merge pull request #103 from sadbox/master
Add support for Handler timeouts via context
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
package irc
|
||||
|
||||
import (
|
||||
"context"
|
||||
"crypto/tls"
|
||||
"log"
|
||||
"net"
|
||||
@@ -30,6 +31,7 @@ type Connection struct {
|
||||
TLSConfig *tls.Config
|
||||
Version string
|
||||
Timeout time.Duration
|
||||
CallbackTimeout time.Duration
|
||||
PingFreq time.Duration
|
||||
KeepAlive time.Duration
|
||||
Server string
|
||||
@@ -70,6 +72,7 @@ type Event struct {
|
||||
Arguments []string
|
||||
Tags map[string]string
|
||||
Connection *Connection
|
||||
Ctx context.Context
|
||||
}
|
||||
|
||||
// Retrieve the last message from Event arguments.
|
||||
|
||||
Reference in New Issue
Block a user