shell

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2022 License: AGPL-3.0 Imports: 20 Imported by: 0

Documentation

Overview

Package shell contains a shell service, along with a gRPC server and client

Index

Constants

View Source
const SubtypeName = resource.SubtypeName("shell")

SubtypeName is the name of the type of service.

Variables

Subtype is a constant that identifies the shell service resource subtype.

Functions

func Named added in v0.0.8

func Named(name string) resource.Name

Named is a helper for getting the named service's typed resource name.

func NewServer

func NewServer(s subtype.Service) pb.ShellServiceServer

NewServer constructs a framesystem gRPC service server.

func WrapWithReconfigurable

func WrapWithReconfigurable(s interface{}) (resource.Reconfigurable, error)

WrapWithReconfigurable wraps a shell service as a Reconfigurable.

Types

type Output

type Output struct {
	Output string // reflects stdout
	Error  string // reflects stderr
	EOF    bool
}

Output reflects an instance of shell output on either stdout or stderr.

type Service

type Service interface {
	Shell(ctx context.Context) (input chan<- string, output <-chan Output, retErr error)
}

A Service handles shells for a local robot.

func New

func New(logger golog.Logger) (Service, error)

New returns a new shell service for the given robot.

func NewClientFromConn

func NewClientFromConn(ctx context.Context, conn rpc.ClientConn, name string, logger golog.Logger) Service

NewClientFromConn constructs a new Client from connection passed in.

Jump to

Keyboard shortcuts

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