summaryrefslogtreecommitdiff
path: root/internal/clients/handlers/handler.go
blob: cac78ad7dab966215e281fdccfe461c7faee2f23 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
package handlers

import (
	"io"
	"time"
)

// Handler provides all methods which can be run on any client handler.
type Handler interface {
	io.ReadWriter
	Capabilities() []string
	HasCapability(name string) bool
	SendMessage(command string) error
	Server() string
	Status() int
	Shutdown()
	Done() <-chan struct{}
	WaitForCapabilities(timeout time.Duration) bool
	WaitForSessionAck(timeout time.Duration) (SessionAck, bool)
}