Documentation ¶
Index ¶
Constants ¶
const EnvVarSshAuthSock = "SSH_AUTH_SOCK"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func NewServer ¶
func NewServer(opts ...ServerOption) (*Server, error)
func (*Server) Listen ¶
Listen creates a listener on the socket file After Listen, the socket file name is available via SocketFile
func (*Server) ListenAndServe ¶
ListenAndServe listens on the socket file and then calls Serve to handle requests on incoming connections. ListenAndServe blocks until the provided context.Context is cancelled
func (*Server) Serve ¶
Serve accepts incoming connections on the Listener l, creating a new goroutine for each. ListenAndServe blocks until the provided context.Context is cancelled
func (*Server) SocketFile ¶
type ServerOption ¶
func PrivateKey ¶
func PrivateKey(privateKey interface{}) ServerOption
PrivateKey is an option which adds the provided private key to the agent. PrivateKey builds on agent.AddedKey privateKey must be either a *rsa.PrivateKey, *dsa.PrivateKey, *ed25519.PrivateKey or *ecdsa.PrivateKey, or if a string or []byte will be parsed before adding.
func SocketFile ¶
func SocketFile(socketFileName string) ServerOption
func TempSocketFile ¶
func TempSocketFile() ServerOption
type TestServer ¶
type TestServer struct {
// contains filtered or unexported fields
}
TestServer helps to run a Server within tests
func NewTestServer ¶
func NewTestServer(t *testing.T, opts ...ServerOption) *TestServer
NewTestServer returns a TestServer