@@ -37,16 +37,30 @@ var sshServerBootstrapScript string
37
37
var errServerMetadata = errors .New ("server metadata error" )
38
38
39
39
type ClientOptions struct {
40
- ClusterID string
41
- ProxyMode bool
42
- ServerMetadata string
43
- ShutdownDelay time.Duration
44
- MaxClients int
45
- HandoverTimeout time.Duration
46
- ReleasesDir string
47
- SSHKeysDir string
48
- AdditionalArgs []string
40
+ // Id of the cluster to connect to
41
+ ClusterID string
42
+ // Delay before shutting down the server after the last client disconnects
43
+ ShutdownDelay time.Duration
44
+ // Maximum number of SSH clients
45
+ MaxClients int
46
+ // Indicates that the CLI runs as a ProxyCommand - it should establish ws connection
47
+ // to the cluster and proxy all traffic through stdin/stdout.
48
+ // In the non proxy mode the CLI spawns an ssh client with the ProxyCommand config.
49
+ ProxyMode bool
50
+ // Expected format: "<user_name>,<port>".
51
+ // If present, the CLI won't attempt to start the server.
52
+ ServerMetadata string
53
+ // How often the CLI should reconnect to the server with new auth.
54
+ HandoverTimeout time.Duration
55
+ // Directory for local SSH tunnel development releases.
56
+ // If not present, the CLI will use github releases with the current version.
57
+ ReleasesDir string
58
+ // Directory for local SSH keys. Defaults to ~/.databricks/ssh-tunnel-keys
59
+ SSHKeysDir string
60
+ // Name of the client public key file to be used in the ssh-tunnel secrets scope.
49
61
ClientPublicKeyName string
62
+ // Additional arguments to pass to the SSH client in the non proxy mode.
63
+ AdditionalArgs []string
50
64
}
51
65
52
66
func RunClient (ctx context.Context , client * databricks.WorkspaceClient , opts ClientOptions ) error {
0 commit comments