Created
March 26, 2019 14:22
-
-
Save pboothe/f283830cd0b4d07508b8866d383ee219 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NewConnector() (Connector) { | |
return &sshConnector{...} | |
} | |
type sshConnector struct { | |
dialer dialer | |
} | |
func (s *sshConnector) NewConnection(...) { | |
s.dialer.Dial() | |
} | |
type ConnectionConfig struct { | |
... | |
} | |
type Connector interface { | |
NewConnection() (Connection, error) | |
} | |
type Connection interface { | |
Reboot() (string, error) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment