rpc

package
v0.0.0-...-278237d Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2015 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(file *os.File)

Types

type Process

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

type ReadCommand

type ReadCommand struct {

	// The relevant pid.
	Pid int `json:"pid"`

	// How much to read?
	N uint `json:"n"`
}

type ReadResult

type ReadResult struct {

	// The data read.
	Data []byte `json:"data"`
}

type Server

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

func (*Server) Read

func (server *Server) Read(
	read *ReadCommand,
	result *ReadResult) error

func (*Server) Start

func (server *Server) Start(
	command *StartCommand,
	result *StartResult) error

func (*Server) Wait

func (server *Server) Wait(
	wait *WaitCommand,
	result *WaitResult) error

func (*Server) Write

func (server *Server) Write(
	write *WriteCommand,
	out *WriteResult) error

type StartCommand

type StartCommand struct {

	// The command to run.
	Command []string `json:"command"`

	// The working directory.
	Cwd string `json:"cwd"`

	// Allocate a terminal?
	Terminal bool `json:"terminal"`

	// The environment.
	Environment []string `json:"environment"`
}

type StartResult

type StartResult struct {

	// The resulting pid.
	Pid int `json:"pid"`
}

type WaitCommand

type WaitCommand struct {

	// The relevant pid.
	Pid int `json:"pid"`
}

type WaitResult

type WaitResult struct {

	// The exit code.
	// (If > 0 then this event is an exit event).
	Exitcode int `json:"exitcode"`
}

type WriteCommand

type WriteCommand struct {

	// The relevant pid.
	Pid int `json:"pid"`

	// The write.
	Data []byte `json:"data"`
}

type WriteResult

type WriteResult struct {

	// How much was written?
	Written int `json:"n"`
}

Jump to

Keyboard shortcuts

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