goremproc

package module
v0.0.0-...-ca315b6 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2016 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrorControlChannelInternalError = errors.New("Internal Error")

ErrorControlChannelInternalError is returned when an inconsistent state is encountered.

View Source
var ErrorControlChannelNotOpen = errors.New("Control channel is not open")

ErrorControlChannelNotOpen is returned for any API call that cannot continue because either the ControlChannel is not ready or has encountered an error.

View Source
var ErrorRequestCancelled = errors.New("Request was cancelled")

ErrorRequestCancelled is returned by an API call when the result chan is closed without returning a result.

View Source
var ErrorStub = errors.New("This function isn't implemented :(")

ErrorStub is returned by functions that aren't complete, which is basically all of them, what are you even doing here.

Functions

This section is empty.

Types

type ControlChannel

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

func (*ControlChannel) Close

func (c *ControlChannel) Close()

Close will terminate the control channel and close any pending request chans.

func (*ControlChannel) IsOpen

func (c *ControlChannel) IsOpen() bool

IsOpen returns true if c.State() == ControlChannelStateOpen.

func (*ControlChannel) LastError

func (c *ControlChannel) LastError() error

LastError returns the last error that occurred on this ControlChannel. Will return nil if everything's OK.

func (*ControlChannel) NewRemoteIPDialer

func (c *ControlChannel) NewRemoteIPDialer() (d *RemoteIPDialer, err error)

NewRemoteIPDialer creates a reusable interface for Dialing new connections.

func (*ControlChannel) State

State returns one of the ControlChannelState constants that describes this ControlChannel.

type ControlChannelReader

type ControlChannelReader func(interface{}) error

A ControlChannelReader is a function that will fill its parameter with values after reading from some abstract pipe, returning nil or an error.

type ControlChannelState

type ControlChannelState uint

ControlChannelState describes the current state of a ControlChannel.

const (
	ControlChannelStateNew ControlChannelState = iota
	ControlChannelStateWaiting
	ControlChannelStateOpen
	ControlChannelStateClosing
	ControlChannelStateClosed
)

type ControlChannelWriter

type ControlChannelWriter func(interface{}) error

A ControlChannelWriter is a function that will write its parameter to an abstract pipe, returning nil or an error.

type RemoteIPConn

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

A RemoteIPConn implements simple ReadWriteCloser semantics.

func (*RemoteIPConn) Close

func (c *RemoteIPConn) Close() error

Close closes the socket on the remote endpoint. The RemoteIPConn will be invalid afterward.

func (*RemoteIPConn) Read

func (c *RemoteIPConn) Read(b []byte) (int, error)

Read reads from the socket opened on the remote endpoint.

func (*RemoteIPConn) Write

func (c *RemoteIPConn) Write(b []byte) (int, error)

Write writes to the socket opened on the remote endpoint.

type RemoteIPDialer

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

A RemoteIPDialer allows you to open an IP connection from a remote endpoint.

func (*RemoteIPDialer) Dial

func (d *RemoteIPDialer) Dial(network, address string) (*RemoteIPConn, error)

Dial attemps to open a socket from the perspective of a remote endpoint.

type RequestPayload

type RequestPayload struct {
	T string
	P []byte
	I issuedRequest
}

RequestPayload encodes the packet format for a request.

Jump to

Keyboard shortcuts

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