transport

package
v0.0.0-...-4fdc974 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TransportSSH = iota
	TransportTELNET
	TransportDummy
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Factory

type Factory struct {
	DummyFileName string
	ReadTimeout   time.Duration
	BufSize       int
}

func (*Factory) GetTransport

func (f *Factory) GetTransport(host *host.Host) (Transport, error)

type ReadTimeout

type ReadTimeout time.Duration

func (*ReadTimeout) UnmarshalXMLAttr

func (t *ReadTimeout) UnmarshalXMLAttr(attr xml.Attr) error

type ReaderData

type ReaderData struct {
	XMLName  xml.Name   `xml:"scenario"`
	SendData []SendData `xml:"send"`
}

type SendData

type SendData struct {
	Timeout ReadTimeout `xml:"timeout,attr"`
	Send    []byte      `xml:",chardata"`
}

type Transport

type Transport interface {
	Open(ctx context.Context, host *host.Host) error
	SetReadTimeout(t time.Duration)
	io.ReadWriteCloser
}

func New

func New(t int, readTimeout time.Duration, bufSize int, dummyFileName string) (Transport, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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