Skip to content

Commit 3d71eb8

Browse files
committed
refactor(ipc): add ssh info to restful /info api
Signed-off-by: Kevin Cui <[email protected]>
1 parent 48763cb commit 3d71eb8

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

pkg/ipc/restful/restful.go

+10-2
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,11 @@ type stateResponse struct {
2727
}
2828

2929
type infoResponse struct {
30-
PodmanSocketPath string `json:"podmanSocketPath"`
30+
PodmanSocketPath string `json:"podmanSocketPath"`
31+
SSHPort int `json:"sshPort"`
32+
SSHUser string `json:"sshUser"`
33+
SSHPublicKeyPath string `json:"sshPublicKeyPath"`
34+
SSHPrivateKeyPath string `json:"sshPrivateKeyPath"`
3135
}
3236

3337
type Restful struct {
@@ -144,7 +148,11 @@ func (s *Restful) Start(ctx context.Context, g *errgroup.Group, nl net.Listener)
144148
func (s *Restful) info() *infoResponse {
145149
s.log.Info("request /info")
146150
return &infoResponse{
147-
PodmanSocketPath: s.opt.ForwardSocketPath,
151+
PodmanSocketPath: s.opt.ForwardSocketPath,
152+
SSHPort: s.opt.SSHPort,
153+
SSHUser: "root",
154+
SSHPublicKeyPath: s.opt.SSHPublicKeyPath,
155+
SSHPrivateKeyPath: s.opt.SSHPrivateKeyPath,
148156
}
149157
}
150158

0 commit comments

Comments
 (0)