shell

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2023 License: AGPL-3.0 Imports: 13 Imported by: 0

Documentation

Overview

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

Index

Constants

View Source
const SubtypeName = "shell"

SubtypeName is the name of the type of service.

Variables

View Source
var API = resource.APINamespaceRDK.WithServiceType(SubtypeName)

API is a variable that identifies the shell service resource API.

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 NewRPCServiceServer added in v0.2.36

func NewRPCServiceServer(coll resource.APIResourceCollection[Service]) interface{}

NewRPCServiceServer constructs a framesystem gRPC service server. It is intentionally untyped to prevent use outside of tests.

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 {
	resource.Resource
	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,
	remoteName string,
	name resource.Name,
	logger golog.Logger,
) (Service, error)

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 API specific functions
Package register registers all relevant shell models and also API specific functions

Jump to

Keyboard shortcuts

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