transport

package
v0.0.0-...-3379b0b Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2018 License: MIT Imports: 15 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GoWinRMErr

type GoWinRMErr struct {
	Actual error
	Msg    string
}

func (*GoWinRMErr) Error

func (e *GoWinRMErr) Error() string

type HttpRequestWrapper

type HttpRequestWrapper func(httpReq *http.Request) *http.Request

type InteractiveCommand

type InteractiveCommand struct {
	*ResultCommand
}

func (*InteractiveCommand) Send

func (c *InteractiveCommand) Send(inputStreamMap map[string]io.Reader) error

type ResultCommand

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

func (*ResultCommand) Close

func (c *ResultCommand) Close() error

func (*ResultCommand) Receive

func (c *ResultCommand) Receive(outputStreamsMap map[string]io.Writer) error

func (*ResultCommand) Stop

func (c *ResultCommand) Stop() error

type SSP

type SSP interface {
	io.Closer

	GetRemoteEndpointAddress() string

	Dial(requestTimeout time.Duration, requestMsg []byte) ([]byte, error)
}

Security Support Provider

type SSPImpl

type SSPImpl struct {
	HttpClient      *http.Client
	UseTLS          bool
	Host            string
	Port            int64
	WrapHttpRequest HttpRequestWrapper
}

The implementation of Security Support Provider

func (*SSPImpl) Close

func (ssp *SSPImpl) Close() error

func (*SSPImpl) Dial

func (ssp *SSPImpl) Dial(requestTimeout time.Duration, requestMsg []byte) ([]byte, error)

func (*SSPImpl) GetRemoteEndpointAddress

func (ssp *SSPImpl) GetRemoteEndpointAddress() string

type Shell

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

func NewShell

func NewShell(sessionId string, ssp SSP) *Shell

func (*Shell) Close

func (s *Shell) Close() error

func (*Shell) Disconnect

func (s *Shell) Disconnect() error

func (*Shell) ExecuteInteractive

func (s *Shell) ExecuteInteractive(command string, arguments ...string) (*InteractiveCommand, error)

func (*Shell) ExecuteResult

func (s *Shell) ExecuteResult(command string, arguments ...string) (*ResultCommand, error)

func (*Shell) Open

func (s *Shell) Open() error

func (*Shell) Reconnect

func (s *Shell) Reconnect() error

Jump to

Keyboard shortcuts

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