fake

package
v0.0.0-...-3a98d3a Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2025 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Overview

Copyright 2023 The Chromium Authors Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.

Index

Constants

View Source
const (
	Localhost = "127.0.0.1:0"
	Password  = "fake_password"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type SSHServer

type SSHServer struct {
	Listener *net.Listener
	// contains filtered or unexported fields
}

SSHServer the object fake ssh server

func NewFakeServer

func NewFakeServer(handler ssh.Handler) (*SSHServer, error)

NewFakeServer create a fake ssh server

func (*SSHServer) Close

func (s *SSHServer) Close() error

Close the ssh server, if there is error, returns it.

func (*SSHServer) GetAddr

func (s *SSHServer) GetAddr() string

GetAddr get which address is listening

func (*SSHServer) Serve

func (s *SSHServer) Serve() error

Serve listens on the TCP network address srv.Addr

Jump to

Keyboard shortcuts

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