move default uncloud socket to /run/uncloud/uncloud.sock

This commit is contained in:
Pavel Sviderski
2024-11-04 20:02:48 +10:00
parent a54666a7ac
commit 17b96a8744
2 changed files with 33 additions and 18 deletions
+5 -5
View File
@@ -18,7 +18,7 @@ type SSHConnectorConfig struct {
Port int
KeyPath string
APISockPath string
SockPath string
}
// SSHConnector establishes a connection to the machine API through an SSH tunnel to the machine.
@@ -49,12 +49,12 @@ func (c *SSHConnector) Connect(ctx context.Context) (*grpc.ClientConn, error) {
}
}
apiSockPath := c.config.APISockPath
if apiSockPath == "" {
apiSockPath = machine.DefaultAPISockPath
sockPath := c.config.SockPath
if sockPath == "" {
sockPath = machine.DefaultUncloudSockPath
}
conn, err := grpc.NewClient(
"unix://"+apiSockPath,
"unix://"+sockPath,
grpc.WithTransportCredentials(insecure.NewCredentials()),
grpc.WithContextDialer(
func(ctx context.Context, addr string) (net.Conn, error) {