Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var RemoveHostChan = make(chan string, 100)
Channel to send remove host to. When received the host is removed from the cache
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Type Type `json:"type" hcl:",label"` User string `json:"username" hcl:"username"` Password string `json:"password" hcl:"password"` Port int `json:"port" hcl:"port"` ScreenLength string `json:"screen_length" hcl:"screen_length,optional"` RegexPrompt string `json:"default_prompt" hcl:"default_prompt"` Errors string `json:"default_errors" hcl:"default_errors"` CacheTTL time.Duration `json:"cache_ttl" hcl:"cache_ttl,optional"` ReadDeadLine time.Duration `json:"read_dead_line" hcl:"read_dead_line,optional"` WriteDeadLine time.Duration `json:"write_dead_line" hcl:"write_dead_line,optional"` SSHKeyPath string `json:"ssh_key_path" hcl:"ssh_key_path,optional"` }
Connection specific configuration.
type Connection ¶
type Connection interface { Init() error Exit() GetConfig() *Config Close() error GetHost() string SetHost(host string) Heartbeat() Heartbeat Lock() Unlock() Closed() chan bool Renewed() chan uint LastUsed() (bool, time.Time) Ping() error Login() error NewRequest(cmd string, expect []string, errors []string) *Request Expect(ctx context.Context, req *Request) *Response GetRegexPrompt() string }
Click to show internal directories.
Click to hide internal directories.