Skip to content

Commit

Permalink
feat(api): add get extended agent socket path (#5)
Browse files Browse the repository at this point in the history
Signed-off-by: Black-Hole1 <[email protected]>
  • Loading branch information
BlackHole1 authored Jan 17, 2024
1 parent 1220051 commit 9322e02
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/sshagent/agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ func NewProxyAgent(log types.Logger) *ProxyAgent {
}
}

// GetExtendedAgentSocketPath returns the extended agent path.
func (a *ProxyAgent) GetExtendedAgentSocketPath() string {
return a.upstreamSocketPath
}

// SetExtendedAgent sets the extended agent path.
func (a *ProxyAgent) SetExtendedAgent(socketPath string) {
a.upstreamSocketPath = socketPath
Expand Down
5 changes: 5 additions & 0 deletions pkg/sshagent/sshagent.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ func New(socketPath string, log types.Logger) (*SSHAgent, error) {
return s, nil
}

// GetExtendedAgentSocketPath returns the extended agent path.
func (s *SSHAgent) GetExtendedAgentSocketPath() string {
return s.poxyAgent.GetExtendedAgentSocketPath()
}

// SetExtendedAgent sets the extended agent path.
func (s *SSHAgent) SetExtendedAgent(p string) {
s.poxyAgent.SetExtendedAgent(p)
Expand Down

0 comments on commit 9322e02

Please sign in to comment.