teleagent

package
v1.2.3-fred.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 18, 2022 License: Apache-2.0 Imports: 12 Imported by: 78

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Agent

type Agent interface {
	agent.ExtendedAgent
	io.Closer
}

Agent extends the agent.ExtendedAgent interface. APIs which accept this interface promise to call `Close()` when they are done using the supplied agent.

func NopCloser

func NopCloser(std agent.ExtendedAgent) Agent

NopCloser wraps an agent.Agent with a NOP closer, allowing it to be passed to APIs which expect the extended agent interface.

type AgentServer added in v1.0.0

type AgentServer struct {
	Path string
	Dir  string
	// contains filtered or unexported fields
}

AgentServer is implementation of SSH agent server

func NewServer added in v1.0.0

func NewServer(getter Getter) *AgentServer

NewServer returns new instance of agent server

func (*AgentServer) Close

func (a *AgentServer) Close() error

Close closes listener and stops serving agent

func (*AgentServer) ListenAndServe added in v1.0.0

func (a *AgentServer) ListenAndServe(addr utils.NetAddr) error

ListenAndServe is similar http.ListenAndServe

func (*AgentServer) ListenUnixSocket

func (a *AgentServer) ListenUnixSocket(sockDir, sockName string, user *user.User) error

ListenUnixSocket starts listening on a new unix socket.

func (*AgentServer) Serve

func (a *AgentServer) Serve() error

Serve starts serving on the listener, assumes that Listen was called before

func (*AgentServer) SetTestPermissions

func (a *AgentServer) SetTestPermissions(testPermissions func())

SetTestPermissions can be used by tests to test agent socket permissions.

type Getter

type Getter func() (Agent, error)

Getter is a function used to get an agent instance.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL