protocol

package
v0.5.7 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2021 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package protocol holds structs and other constructs that are used by the network transport for cross-network RPC calls

Index

Constants

View Source
const (
	// RPCName is the name/prefix used for RPC methods
	RPCName = "NetworkRPC"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ProcessExit

type ProcessExit struct {
	Return    int
	StrReturn string
	Error     SerialiseError
}

ProcessExit represents all available information regarding a process that has exited

type SerialiseError

type SerialiseError struct {
	ErrorStr string
	IsError  bool
}

SerialiseError is an error struct that is safe to transfer over a gob encoding

func SErrorFromError

func SErrorFromError(err error) SerialiseError

SErrorFromError converts an error to a SerializeError

func SErrorFromString

func SErrorFromString(str string) SerialiseError

SErrorFromString creates a SerialiseError from the given string

func (*SerialiseError) ToError

func (s *SerialiseError) ToError() error

ToError converts a SerialiseError to an error interface

type StdIOLine

type StdIOLine struct {
	Line   string
	Stdout bool
	ID     int64
}

StdIOLine holds a single line from a process sent over StdIO

type StdIOLines

type StdIOLines struct {
	Lines []StdIOLine
	// Stdout bool
	Error SerialiseError
}

StdIOLines holds a set of lines for processing

Jump to

Keyboard shortcuts

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