Documentation ¶
Overview ¶
Package agentport supports serving the SSH Agent protocol to Chrome's Secure Shell Extension.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AgentPort ¶ added in v0.0.20
type AgentPort struct {
// contains filtered or unexported fields
}
func New ¶
New returns a io.ReaderWriter that converts from the Chrome Secure Shell Extension's SSH Agent protocol to the standard SSH Agent protocol.
p is a Chrome Port object to which the Chrome Secure Shell Extension has connected.
func (*AgentPort) OnDisconnect ¶ added in v0.0.20
func (ap *AgentPort) OnDisconnect()
func (*AgentPort) SendMessages ¶ added in v0.0.20
func (ap *AgentPort) SendMessages()
type AgentPorts ¶ added in v0.0.20
type AgentPorts map[*portRef]*AgentPort
AgentPorts is a mapping of chrome.runtime.Port objects to the corresponding connection (AgentPort) with our Agent.
func (AgentPorts) Add ¶ added in v0.0.20
func (a AgentPorts) Add(port js.Value, ap *AgentPort)
Add adds an AgentPort corresponding to the supplied Port.
func (AgentPorts) Delete ¶ added in v0.0.20
func (a AgentPorts) Delete(port js.Value)
Delete removes the AgentPort corresponding to the supplied Port.
func (AgentPorts) Lookup ¶ added in v0.0.20
func (a AgentPorts) Lookup(port js.Value) *AgentPort
Lookup returns the AgentPort corresponding to the supplied Port value. A Port value is considered equal if it refers to the exact same Port as was originally supplied. This works because the Chrome runtime appears to maintain a unique Port value for each port, and just pass around a reference to it. Thus, we use js.Value.Equal() to compare ports; two references to the same object are equal iff they are equal in the '===' sense in Javascript.