cmd

package
v0.0.0-...-1b2b1d4 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Command

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

func NewCommand

func NewCommand(ctx context.Context, name string, arg ...string) (*Command, error)

func (*Command) Call

func (cmd *Command) Call(ctx context.Context, serviceMethod string, args any, reply any) error

Call performs RPC call, the context is not propagated to the server. It should be used for client-only timeout. Since contexts are not passed to the server, the call will continue execution on the server even if the client was already cancelled and possibly can block other subsequent calls.

func (*Command) Start

func (cmd *Command) Start(ctx context.Context) error

func (*Command) Stop

func (cmd *Command) Stop(ctx context.Context) error

Stop for all "in flight" calls to be finished first, then it closes the pipe and sends termination signal to the subprocess and waits until the process exits.

Jump to

Keyboard shortcuts

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