shell

package
v0.0.0-...-371c99e Latest Latest
Warning

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

Go to latest
Published: May 24, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CommandDone    = iota
	CommandPending = iota
	CommandRunning = iota
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CommandState

type CommandState struct {
	StateEnum int
	ExitCode  int
}

type Shell

type Shell struct {
	ShellId    string
	CommandIds []string
	// contains filtered or unexported fields
}

func NewShell

func NewShell(endpoint string,
	username string,
	password string,
	keytab_file string) (*Shell, error)

func (*Shell) Cleanup

func (s *Shell) Cleanup()

func (*Shell) Command

func (s *Shell) Command(ShellId string, command []string, SkipCmdShell bool, ConsoleModeStdin bool,
	optionset protocol.OptionSet) (string, error)

func (*Shell) Create

func (s *Shell) Create(InputStreams []string, OutputStreams []string, Name string,
	Environment map[string]string, WorkingDirectory string,
	Lifetime string, IdleTimeOut string) (ShellInstance, error)

func (*Shell) Delete

func (s *Shell) Delete(ShellId string) error

func (*Shell) Get

func (s *Shell) Get(ShellId string) (ShellInstance, error)

func (*Shell) List

func (s *Shell) List() ([]ShellInstance, error)

func (*Shell) Receive

func (s *Shell) Receive(ShellId string, CommandId string, Streams []string) (CommandState, []StreamType, error)

func (*Shell) Send

func (s *Shell) Send(ShellId string, CommandId string, Data string, Stream string, End bool) (string, error)

type ShellInstance

type ShellInstance struct {
	ShellId          string
	ResourceUri      string
	Owner            string
	ClientIP         string
	Environment      map[string]string
	WorkingDirectory string
	IdleTimeOut      string
	InputStreams     string
	OutputStreams    string
	ShellRunTime     string
	ShellInactivity  string
}

func (*ShellInstance) FromEtreeElement

func (si *ShellInstance) FromEtreeElement(ete *etree.Element)

func (ShellInstance) Json

func (si ShellInstance) Json() string

func (ShellInstance) String

func (si ShellInstance) String() string

type StreamType

type StreamType struct {
	End  bool
	Data []byte
}

Jump to

Keyboard shortcuts

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