shell

package
v0.2.11 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2023 License: AGPL-3.0 Imports: 14 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 NewUnimplementedInterfaceError added in v0.1.0

func NewUnimplementedInterfaceError(actual interface{}) error

NewUnimplementedInterfaceError is used when there is a failed interface check.

func WrapWithReconfigurable

func WrapWithReconfigurable(s interface{}, name resource.Name) (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, extra map[string]interface{}) (input chan<- string, output <-chan Output, retErr error)
}

A Service handles shells for a local 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.

Directories

Path Synopsis
Package builtin contains a shell service, along with a gRPC server and client
Package builtin contains a shell service, along with a gRPC server and client
Package register registers all relevant shell models and also subtype specific functions
Package register registers all relevant shell models and also subtype specific functions

Jump to

Keyboard shortcuts

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