test

package
v2.0.0-...-98537dd Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ServerPort = 50051
)

Variables

View Source
var (
	JupyterPort      = 1234
	JupyterServerUrl = "http://localhost:1234?token=1234"
	JupyterMessage   = ""
	JupyterResult    = true
)

Functions

func StartServer

func StartServer(ctx context.Context) error

Starts the mock gRPC server listening on port 50051

Types

type Channel

type Channel struct {
	// contains filtered or unexported fields
}

func (*Channel) Close

func (c *Channel) Close() error

func (*Channel) CloseWrite

func (c *Channel) CloseWrite() error

func (*Channel) Read

func (c *Channel) Read(data []byte) (int, error)

func (*Channel) SendRequest

func (c *Channel) SendRequest(name string, wantReply bool, payload []byte) (bool, error)

func (*Channel) Stderr

func (c *Channel) Stderr() io.ReadWriter

func (*Channel) Write

func (c *Channel) Write(data []byte) (int, error)

type Session

type Session struct {
	// contains filtered or unexported fields
}

func (*Session) KeepAlive

func (s *Session) KeepAlive(reason string)

func (*Session) OpenStreamingChannel

func (s *Session) OpenStreamingChannel(ctx context.Context, id liveshare.ChannelID) (ssh.Channel, error)

Creates mock SSH channel connected to the mock gRPC server

func (*Session) StartSharing

func (s *Session) StartSharing(ctx context.Context, sessionName string, port int) (liveshare.ChannelID, error)

Jump to

Keyboard shortcuts

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