forked from cloudfoundry/bosh-cli
-
Notifications
You must be signed in to change notification settings - Fork 0
/
interfaces.go
51 lines (36 loc) · 843 Bytes
/
interfaces.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
package ssh
import (
"io"
boshdir "github.com/cloudfoundry/bosh-cli/director"
)
//go:generate counterfeiter . Runner
type Runner interface {
Run(ConnectionOpts, boshdir.SSHResult, []string) error
}
//go:generate counterfeiter . SCPRunner
type SCPRunner interface {
Run(ConnectionOpts, boshdir.SSHResult, SCPArgs) error
}
type ConnectionOpts struct {
PrivateKey string
GatewayDisable bool
GatewayUsername string
GatewayHost string
GatewayPrivateKeyPath string
SOCKS5Proxy string
RawOpts []string
}
//go:generate counterfeiter . Session
type Session interface {
Start() ([]string, error)
Finish() error
}
type Writer interface {
ForInstance(jobName, indexOrID string) InstanceWriter
Flush()
}
type InstanceWriter interface {
Stdout() io.Writer
Stderr() io.Writer
End(exitStatus int, err error)
}