Documentation ¶
Index ¶
Constants ¶
View Source
const ( DefaultConnectTimeout = time.Second * 10 DefaultMsgPipeLength = 10 MaxBufferSize = 10 << 20 DefaultBufferSize = 4096 )
View Source
const (
MinKeepAliveDuration = time.Second * 5
)
Variables ¶
This section is empty.
Functions ¶
func ReplaceAnsiEscapeCode ¶
Types ¶
type Protocol ¶
type Protocol interface { Connect(host string, port int, username string, password string) error Disconnect() error SetInput(content string) error GetOutputPipe() (<-chan string, error) }
Protocol provide an interface to implement transport protocol
func NewProtocol ¶
type Query ¶
type Query interface { Init(protocol Protocol, keepAliveDuration time.Duration, keepAliveData string, keepAliveResponseLines int) error Request(content string) error GetResponsePipe() (<-chan string, error) Close() error }
Query provide an interface to implement standard io with protocol io
Click to show internal directories.
Click to hide internal directories.