udschannel

package
v1.0.7 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CustomerPipeStart = 3
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Channel

type Channel struct {
	ProducerSocket int
	ConsumerSocket int
	// contains filtered or unexported fields
}

func NewChannel

func NewChannel(producerSocket, consumerSocket int) *Channel

func (*Channel) Close

func (c *Channel) Close() error

func (*Channel) Read

func (c *Channel) Read(buf []byte) (int, error)

func (*Channel) Write

func (c *Channel) Write(bytes []byte) (int, error)

type UdsChannel

type UdsChannel struct {
	Child       *os.Process
	ChildStdOut *os.File
	ChildStdErr *os.File

	Closed bool

	Channels []*Channel

	// watch the child process status
	ChildExit chan error
}

func NewController

func NewController(filePath string, args []string, channelNum int) (*UdsChannel, error)

NOTICE :the stdioMapping param is a analogy of nodejs spawn stdio map , like stdio:["ignore", "inherit", "pipe"]

func (*UdsChannel) GetChannel

func (w *UdsChannel) GetChannel(index int) (*Channel, error)

func (*UdsChannel) Signal

func (w *UdsChannel) Signal(signal os.Signal) error

func (*UdsChannel) StopChild

func (w *UdsChannel) StopChild() error

func (*UdsChannel) WatchChild

func (w *UdsChannel) WatchChild() chan error

Jump to

Keyboard shortcuts

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