stdinservice

package
v0.1.13 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package stdinservice implements a service which, on request, executes a command on the client, passes data to its stdin and returns the result.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Factory

func Factory(conf *fspb.ClientServiceConfig) (service.Service, error)

Factory is a service.Factory for StdinServices.

In response to every received sspb.InputMessage, a StdinService fires up a process, pipes the given input message to its stdin, waits for it to finish and sends the contents of stdout and stderr back to the server. The process is expected to finish relatively quickly.

conf.Config should be of proto type DaemonServiceConfig.

Types

type StdinService

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

StdinService implements a service.Service which runs a command one for each message received, passing data to it through stdin and getting the results through stdout/stderr.

func (*StdinService) ProcessMessage

func (s *StdinService) ProcessMessage(ctx context.Context, m *fspb.Message) error

func (*StdinService) Start

func (s *StdinService) Start(sc service.Context) error

func (*StdinService) Stop

func (s *StdinService) Stop() error

Directories

Path Synopsis
proto

Jump to

Keyboard shortcuts

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