process

package
v0.0.0-...-dfce1b8 Latest Latest
Warning

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

Go to latest
Published: May 2, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ID

type ID = string

type Manager

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

func NewManager

func NewManager(logger *zap.SugaredLogger) *Manager

func (*Manager) Add

func (m *Manager) Add(id ID, shell, cmd string, envVars *map[string]string, rootdir string) (*Process, error)

func (*Manager) Get

func (m *Manager) Get(id ID) (*Process, bool)

func (*Manager) Remove

func (m *Manager) Remove(id ID)

type Process

type Process struct {
	Stdin *io.WriteCloser
	ID    ID
	// contains filtered or unexported fields
}

func New

func New(id ID, shell, cmdToExecute string, envVars *map[string]string, rootdir string, logger *zap.SugaredLogger) (*Process, error)

func (*Process) Kill

func (p *Process) Kill()

func (*Process) WriteStdin

func (p *Process) WriteStdin(data string) error

type Service

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

func NewService

func NewService(logger *zap.SugaredLogger, env *env.EnvConfig, clock *clock.Service) *Service

func (*Service) Kill

func (s *Service) Kill(id ID)

func (*Service) OnExit

func (s *Service) OnExit(ctx context.Context, id ID) (*rpc.Subscription, error)

Subscription

func (*Service) OnStderr

func (s *Service) OnStderr(ctx context.Context, id ID) (*rpc.Subscription, error)

Subscription

func (*Service) OnStdout

func (s *Service) OnStdout(ctx context.Context, id ID) (*rpc.Subscription, error)

Subscription

func (*Service) Start

func (s *Service) Start(id ID, cmd string, envVars *map[string]string, rootdir string) (ID, error)

func (*Service) Stdin

func (s *Service) Stdin(id ID, data string) error

Jump to

Keyboard shortcuts

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