diff options
| author | Paul Bütow <pbuetow@mimecast.com> | 2020-01-09 20:30:15 +0000 |
|---|---|---|
| committer | Paul Bütow <pbuetow@mimecast.com> | 2020-01-09 20:30:15 +0000 |
| commit | 3755a9911ecb05886577095f2b8cc8b9e4066a3a (patch) | |
| tree | 86e24bc466986cb5c9c6d167a918e6064defeafc /clients/handlers/clienthandler.go | |
Release of DTail v1.0.0v1.0.0
Diffstat (limited to 'clients/handlers/clienthandler.go')
| -rw-r--r-- | clients/handlers/clienthandler.go | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/clients/handlers/clienthandler.go b/clients/handlers/clienthandler.go new file mode 100644 index 0000000..e818b52 --- /dev/null +++ b/clients/handlers/clienthandler.go @@ -0,0 +1,26 @@ +package handlers + +import ( + "dtail/logger" +) + +// ClientHandler is the basic client handler interface. +type ClientHandler struct { + baseHandler +} + +// NewClientHandler creates a new client handler. +func NewClientHandler(server string, pingTimeout int) *ClientHandler { + logger.Debug(server, "Creating new client handler") + + return &ClientHandler{ + baseHandler{ + server: server, + shellStarted: false, + commands: make(chan string), + pong: make(chan struct{}, 1), + stop: make(chan struct{}), + pingTimeout: pingTimeout, + }, + } +} |
