Documentation
¶
Index ¶
- Constants
- func GetLocalIP(ctx context.Context) (net.IP, error)
- func GetPublicIPStr(ctx context.Context) (string, error)
- func GetTestPrivateKey() string
- func GetTestPublicKey() string
- func StartTestSSHServer(options TestSSHServerOptions) (func() error, error)
- func TrySSHConnect(ctx context.Context, c ConnectionConfig, options WaitForSSHOptions) error
- func WaitForSSH(ctx context.Context, c ConnectionConfig, options WaitForSSHOptions) error
- type Client
- type ConnectionConfig
- type TestSSHServerOptions
- type WaitForSSHOptions
Constants ¶
View Source
const DoNotUseDummyPrivateKey = `` /* 886-byte string literal not displayed */
View Source
const PubKey = `` /* 271-byte string literal not displayed */
Variables ¶
This section is empty.
Functions ¶
func GetTestPrivateKey ¶
func GetTestPrivateKey() string
func GetTestPublicKey ¶
func GetTestPublicKey() string
func StartTestSSHServer ¶
func StartTestSSHServer(options TestSSHServerOptions) (func() error, error)
func TrySSHConnect ¶
func TrySSHConnect(ctx context.Context, c ConnectionConfig, options WaitForSSHOptions) error
func WaitForSSH ¶
func WaitForSSH(ctx context.Context, c ConnectionConfig, options WaitForSSHOptions) error
Types ¶
type Client ¶
type Client struct {
Certificate string
// contains filtered or unexported fields
}
modified from https://github.com/superfly/flyctl/blob/master/ssh/client.go https://github.com/golang/go/issues/20288#issuecomment-832033017
func ConnectToHost ¶
func ConnectToHost(ctx context.Context, config ConnectionConfig) (*Client, error)
type ConnectionConfig ¶
type ConnectionConfig struct {
User, HostPort, PrivKey string
}
type TestSSHServerOptions ¶
type WaitForSSHOptions ¶
type WaitForSSHOptions struct {
Timeout time.Duration
ConnectionTimeout time.Duration
CheckCmd string
WaitTime time.Duration
}
func (*WaitForSSHOptions) SetDefault ¶
func (o *WaitForSSHOptions) SetDefault()
Click to show internal directories.
Click to hide internal directories.