mirror of
https://github.com/psviderski/uncloud.git
synced 2026-08-26 11:03:34 +00:00
feat: add 'uc proxy' command to proxy a service port to a local port (#384)
Signed-off-by: Miek Gieben <miek@miek.nl> Co-authored-by: Pasha Sviderski <me@psviderski.name>
This commit is contained in:
co-authored by
Pasha Sviderski
parent
24b81af43c
commit
3586a32987
@@ -65,6 +65,11 @@ func (cli *Client) Close() error {
|
||||
return errors.Join(cli.conn.Close(), cli.connector.Close())
|
||||
}
|
||||
|
||||
// Dialer returns a proxy dialer for establishing connections within the cluster if supported by the connector.
|
||||
func (cli *Client) Dialer() (proxy.ContextDialer, error) {
|
||||
return cli.connector.Dialer()
|
||||
}
|
||||
|
||||
// progressOut returns an output stream for progress writer.
|
||||
func (cli *Client) progressOut() *streams.Out {
|
||||
return streams.NewOut(os.Stdout)
|
||||
|
||||
+1
-1
@@ -241,7 +241,7 @@ func (cli *Client) pushImageToMachine(
|
||||
machineIP := network.MachineIP(machineSubnet)
|
||||
unregistryAddr := net.JoinHostPort(machineIP.String(), strconv.Itoa(constants.UnregistryPort))
|
||||
|
||||
dialer, err := cli.connector.Dialer()
|
||||
dialer, err := cli.Dialer()
|
||||
if err != nil {
|
||||
return fmt.Errorf("get proxy dialer: %w", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user